diff options
| author | River Riddle <riverriddle@google.com> | 2019-09-01 20:06:42 -0700 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-09-01 20:07:08 -0700 |
| commit | 6563b1c4463472d5bdc83a3a62a1da1a3052ce18 (patch) | |
| tree | d18db308d1013ab66f2e59fc9806904605862556 /mlir/test/lib/Transforms | |
| parent | ce702fc8dafab9d8d0db4e61025c65db979cd701 (diff) | |
| download | bcm5719-llvm-6563b1c4463472d5bdc83a3a62a1da1a3052ce18.tar.gz bcm5719-llvm-6563b1c4463472d5bdc83a3a62a1da1a3052ce18.zip | |
Add a new dialect interface for the OperationFolder `OpFolderDialectInterface`.
This interface will allow for providing hooks to interrop with operation folding. The first hook, 'shouldMaterializeInto', will allow for controlling which region to insert materialized constants into. The folder will generally materialize constants into the top-level isolated region, this allows for materializing into a lower level ancestor region if it is more profitable/correct.
PiperOrigin-RevId: 266702972
Diffstat (limited to 'mlir/test/lib/Transforms')
| -rw-r--r-- | mlir/test/lib/Transforms/TestConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/test/lib/Transforms/TestConstantFold.cpp b/mlir/test/lib/Transforms/TestConstantFold.cpp index 9c541699e99..b1c895257c3 100644 --- a/mlir/test/lib/Transforms/TestConstantFold.cpp +++ b/mlir/test/lib/Transforms/TestConstantFold.cpp @@ -61,7 +61,7 @@ void TestConstantFold::runOnFunction() { // folding are at the beginning. This creates somewhat of a linear ordering to // the newly generated constants that matches the operation order and improves // the readability of test cases. - OperationFolder helper; + OperationFolder helper(&getContext()); for (Operation *op : llvm::reverse(ops)) foldOperation(op, helper); |

