Add new 'createOrFold' methods to FuncBuilder to immediately try to fold an operation...
authorRiver Riddle <riverriddle@google.com>
Wed, 5 Jun 2019 17:50:10 +0000 (10:50 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 9 Jun 2019 23:18:55 +0000 (16:18 -0700)
commit6f5f5a91783b89f1e5fff52c33fc5b9c4ae61425
tree3bd5c4171fdb00fa1db3c6b6cc9e26b8beba9f9c
parent9fc00cf8402ea6b9866479e704db6ecd29e9f95b
Add new 'createOrFold' methods to FuncBuilder to immediately try to fold an operation after creating it. This can be used to remove operations that are likely to be trivially folded later. Note, these functions only fold operations if all of the folded results are existing values.

PiperOrigin-RevId: 251674299
mlir/include/mlir/IR/Builders.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/IR/Builders.cpp
mlir/lib/Linalg/Utils/Utils.cpp