[Mlir-commits] [mlir] [mlir][inliner] Return early if the inliningThreshold is 0U or -1U. (PR #86287)

Brendan Duke llvmlistbot at llvm.org
Fri Mar 22 07:22:33 PDT 2024


================
@@ -93,12 +93,17 @@ InlinerPass::InlinerPass(std::function<void(OpPassManager &)> defaultPipeline,
 // Return true if the inlining ratio does not exceed the threshold.
 static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
                                  unsigned inliningThreshold) {
+  if (inliningThreshold == 0U)
----------------
dukebw wrote:

Suggestion: add a comment here explaining the early return logic.

https://github.com/llvm/llvm-project/pull/86287


More information about the Mlir-commits mailing list