Skip to content
  1. Mar 21, 2021
    • Chris Lattner's avatar
      Change OwningRewritePatternList to carry an MLIRContext with it. · 3a506b31
      Chris Lattner authored
      This updates the codebase to pass the context when creating an instance of
      OwningRewritePatternList, and starts removing extraneous MLIRContext
      parameters.  There are many many more to be removed.
      
      Differential Revision: https://reviews.llvm.org/D99028
      3a506b31
    • Chris Lattner's avatar
      [Canonicalizer] Process regions top-down instead of bottom up & reuse existing constants. · 361b7d12
      Chris Lattner authored
      This reapplies b5d9a3c9 / https://reviews.llvm.org/D98609 with a one line fix in
      processExistingConstants to skip() when erasing a constant we've already seen.
      
      Original commit message:
      
       1) Change the canonicalizer to walk the function in top-down order instead of
          bottom-up order.  This composes well with the "top down" nature of constant
          folding and simplification, reducing iterations and re-evaluation of ops in
          simple cases.
       2) Explicitly enter existing constants into the OperationFolder table before
          canonicalizing.  Previously we would "constant fold" them and rematerialize
          them, wastefully recreating a bunch fo constants, which lead to pointless
          memory traffic.
      
      Both changes together provide a 33% speedup for canonicalize on some mid-size
      CIRCT examples.
      
      One artifact of this change is that the constants generated in normal pattern
      application get inserted at the top of the function as the patterns are applied.
      Because of this, we get "inverted" constants more often, which is an aethetic
      change to the IR but does permute some testcases.
      
      Differential Revision: https://reviews.llvm.org/D99006
      361b7d12
  2. Mar 20, 2021
  3. Mar 19, 2021
  4. Mar 18, 2021
Loading