Skip to content

Commit 78ecd80

Browse files
committed
update
1 parent 5fc9687 commit 78ecd80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ namespace {
2323
struct 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.

0 commit comments

Comments
 (0)