[llvm] r338896 - [Partial Inlining] Fix small bug in detecting if we did something
Graham Yiu via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 3 07:42:53 PDT 2018
Author: gyiu
Date: Fri Aug 3 07:42:53 2018
New Revision: 338896
URL: http://llvm.org/viewvc/llvm-project?rev=338896&view=rev
Log:
[Partial Inlining] Fix small bug in detecting if we did something
- It's possible for 'Changed' to return as false even if we did
partial inline something. Fixed to accumulate return values
Modified:
llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp?rev=338896&r1=338895&r2=338896&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PartialInlining.cpp Fri Aug 3 07:42:53 2018
@@ -1461,9 +1461,7 @@ bool PartialInlinerImpl::run(Module &M)
std::pair<bool, Function * > Result = unswitchFunction(CurrFunc);
if (Result.second)
Worklist.push_back(Result.second);
- if (Result.first) {
- Changed = true;
- }
+ Changed |= Result.first;
}
return Changed;
More information about the llvm-commits
mailing list