diff options
author | River Riddle <riverriddle@google.com> | 2019-07-18 18:20:03 -0700 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2019-07-19 11:40:19 -0700 |
commit | 28057ff3daa241f79417817a9d9ee821cffc83fd (patch) | |
tree | 0df8f33118626981b1ae8d273c70517075a28ef0 /mlir/test/lib/Transforms/TestLoopMapping.cpp | |
parent | 36a26e00334446abfc4a03f30c58a36914d33235 (diff) | |
download | bcm5719-llvm-28057ff3daa241f79417817a9d9ee821cffc83fd.tar.gz bcm5719-llvm-28057ff3daa241f79417817a9d9ee821cffc83fd.zip |
Add support for providing a legality callback for dynamic legality in DialectConversion.
This allows for providing specific handling for dynamically legal operations/dialects without overriding the general 'isDynamicallyLegal' hook. This also means that a derived ConversionTarget class need not always be defined when some operations are dynamically legal.
Example usage:
ConversionTarget target(...);
target.addDynamicallyLegalOp<ReturnOp>([](ReturnOp op) {
return ...
};
target.addDynamicallyLegalDialect<StandardOpsDialect>([](Operation *op) {
return ...
};
PiperOrigin-RevId: 258884753
Diffstat (limited to 'mlir/test/lib/Transforms/TestLoopMapping.cpp')
0 files changed, 0 insertions, 0 deletions