File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -728,7 +728,8 @@ bool GlobalMergeImpl::run(Module &M) {
728
728
729
729
Type *Ty = GV.getValueType ();
730
730
TypeSize AllocSize = DL.getTypeAllocSize (Ty);
731
- if (AllocSize < Opt.MaxOffset && AllocSize >= Opt.MinSize ) {
731
+ bool CanMerge = AllocSize < Opt.MaxOffset && AllocSize >= Opt.MinSize ;
732
+ if (CanMerge) {
732
733
if (TM &&
733
734
TargetLoweringObjectFile::getKindForGlobal (&GV, *TM).isBSS ())
734
735
BSSGlobals[{AddressSpace, Section}].push_back (&GV);
@@ -737,11 +738,8 @@ bool GlobalMergeImpl::run(Module &M) {
737
738
else
738
739
Globals[{AddressSpace, Section}].push_back (&GV);
739
740
}
740
- LLVM_DEBUG (dbgs () << " GV "
741
- << ((DL.getTypeAllocSize (Ty) < Opt.MaxOffset )
742
- ? " to merge: "
743
- : " not to merge: " )
744
- << GV << " \n " );
741
+ LLVM_DEBUG (dbgs () << " GV " << (CanMerge ? " " : " not " ) << " to merge: " << GV
742
+ << " \n " );
745
743
}
746
744
747
745
for (auto &P : Globals)
You can’t perform that action at this time.
0 commit comments