[llvm] 6e4fbd2 - [ModuleInliner] Set Changed earlier (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 17 14:16:42 PDT 2022
Author: Kazu Hirata
Date: 2022-09-17T14:16:32-07:00
New Revision: 6e4fbd2f511cbfbabb516570f8406739f0e26148
URL: https://github.com/llvm/llvm-project/commit/6e4fbd2f511cbfbabb516570f8406739f0e26148
DIFF: https://github.com/llvm/llvm-project/commit/6e4fbd2f511cbfbabb516570f8406739f0e26148.diff
LOG: [ModuleInliner] Set Changed earlier (NFC)
It makes more sense to set Changed to true immediately after a
successful inlining.
Added:
Modified:
llvm/lib/Transforms/IPO/ModuleInliner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/ModuleInliner.cpp b/llvm/lib/Transforms/IPO/ModuleInliner.cpp
index cbfcf40cc919..5dc7c777d7c1 100644
--- a/llvm/lib/Transforms/IPO/ModuleInliner.cpp
+++ b/llvm/lib/Transforms/IPO/ModuleInliner.cpp
@@ -224,6 +224,7 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
continue;
}
+ Changed = true;
++NumInlined;
LLVM_DEBUG(dbgs() << " Size after inlining: " << F.getInstructionCount()
@@ -282,8 +283,6 @@ PreservedAnalyses ModuleInlinerPass::run(Module &M,
Advice->recordInliningWithCalleeDeleted();
else
Advice->recordInlining();
-
- Changed = true;
}
// Now that we've finished inlining all of the calls across this module,
More information about the llvm-commits
mailing list