[llvm] r245954 - Fix dropped conditional in cleanup in r245752
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 10:01:37 PDT 2015
Author: dblaikie
Date: Tue Aug 25 12:01:36 2015
New Revision: 245954
URL: http://llvm.org/viewvc/llvm-project?rev=245954&view=rev
Log:
Fix dropped conditional in cleanup in r245752
Code review feedback by Charlie Turner.
Modified:
llvm/trunk/lib/CodeGen/GlobalMerge.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalMerge.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalMerge.cpp?rev=245954&r1=245953&r2=245954&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalMerge.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalMerge.cpp Tue Aug 25 12:01:36 2015
@@ -569,9 +569,10 @@ bool GlobalMerge::doInitialization(Modul
if (P.second.size() > 1)
Changed |= doMerge(P.second, M, false, P.first);
- for (auto &P : ConstGlobals)
- if (P.second.size() > 1)
- Changed |= doMerge(P.second, M, true, P.first);
+ if (EnableGlobalMergeOnConst)
+ for (auto &P : ConstGlobals)
+ if (P.second.size() > 1)
+ Changed |= doMerge(P.second, M, true, P.first);
return Changed;
}
More information about the llvm-commits
mailing list