Skip to content
Snippets Groups Projects
  • River Riddle's avatar
    af371f9f
    Reland [GreedPatternRewriter] Preprocess constants while building worklist... · af371f9f
    River Riddle authored
    Reland [GreedPatternRewriter] Preprocess constants while building worklist when not processing top down
    
    Reland Note: Adds a fix to properly mark a commutative operation as folded if we change the order
                 of its operands. This was uncovered by the fact that we no longer re-process constants.
    
    This avoids accidentally reversing the order of constants during successive
    application, e.g. when running the canonicalizer. This helps reduce the number
    of iterations, and also avoids unnecessary changes to input IR.
    
    Fixes #51892
    
    Differential Revision: https://reviews.llvm.org/D122692
    af371f9f
    History
    Reland [GreedPatternRewriter] Preprocess constants while building worklist...
    River Riddle authored
    Reland [GreedPatternRewriter] Preprocess constants while building worklist when not processing top down
    
    Reland Note: Adds a fix to properly mark a commutative operation as folded if we change the order
                 of its operands. This was uncovered by the fact that we no longer re-process constants.
    
    This avoids accidentally reversing the order of constants during successive
    application, e.g. when running the canonicalizer. This helps reduce the number
    of iterations, and also avoids unnecessary changes to input IR.
    
    Fixes #51892
    
    Differential Revision: https://reviews.llvm.org/D122692
Code owners
Assign users and groups as approvers for specific file changes. Learn more.