[llvm] r339390 - ConstantMerge: update MadeChange when change is made
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 9 14:36:57 PDT 2018
Author: jfb
Date: Thu Aug 9 14:36:57 2018
New Revision: 339390
URL: http://llvm.org/viewvc/llvm-project?rev=339390&view=rev
Log:
ConstantMerge: update MadeChange when change is made
It was always false, which is obviously wrong.
Modified:
llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp
Modified: llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp?rev=339390&r1=339389&r2=339390&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ConstantMerge.cpp Thu Aug 9 14:36:57 2018
@@ -220,6 +220,7 @@ static bool mergeConstants(Module &M) {
assert(Replacements[i].first->hasLocalLinkage() &&
"Refusing to delete an externally visible global variable.");
Replacements[i].first->eraseFromParent();
+ MadeChange = true;
}
NumMerged += Replacements.size();
More information about the llvm-commits
mailing list