File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
mlir/lib/Dialect/Func/Extensions Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,16 @@ namespace {
2323struct FuncInlinerInterface : public DialectInlinerInterface {
2424 using DialectInlinerInterface::DialectInlinerInterface;
2525
26+ static constexpr const char * NoInlineAttrName = " noinline" ;
27+
2628 // ===--------------------------------------------------------------------===//
2729 // Analysis Hooks
2830 // ===--------------------------------------------------------------------===//
2931
3032 // / All call operations can be inlined.
3133 bool isLegalToInline (Operation *call, Operation *callable,
3234 bool wouldBeCloned) const final {
33- return true ;
35+ return !call-> hasAttr (NoInlineAttrName) && !callable-> hasAttr (NoInlineAttrName) ;
3436 }
3537
3638 // / All operations can be inlined.
You can’t perform that action at this time.
0 commit comments