9bdfa8df0d
Remove the IR modification callbacks from `OperationFolder`. Instead, an optional `RewriterBase::Listener` can be specified. * `processGeneratedConstants` => `notifyOperationCreated` * `preReplaceAction` => `notifyOperationReplaced` This simplifies the GreedyPatternRewriterDriver because we no longer need special handling for IR modifications due to op folding. A folded operation is now enqueued on the GreedyPatternRewriteDriver's worklist if it was modified in-place. (There may be new patterns that apply after folding.) Also fixes a bug in `TestOpInPlaceFold::fold`. The folder could previously be applied over and over and did not return a "null" OpFoldResult if the IR was not modified. (This is similar to a pattern that returns `success` without modifying IR; it can trigger an infinite loop in the GreedyPatternRewriteDriver.) Differential Revision: https://reviews.llvm.org/D144463 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
lit.local.cfg | ||
TestCommutativityUtils.cpp | ||
TestConstantFold.cpp | ||
TestControlFlowSink.cpp | ||
TestDialectConversion.cpp | ||
TestDialectConversion.pdll | ||
TestInlining.cpp | ||
TestIntRangeInference.cpp | ||
TestTopologicalSort.cpp |