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) {
728728
729729 Type *Ty = GV.getValueType ();
730730 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) {
732733 if (TM &&
733734 TargetLoweringObjectFile::getKindForGlobal (&GV, *TM).isBSS ())
734735 BSSGlobals[{AddressSpace, Section}].push_back (&GV);
@@ -737,11 +738,8 @@ bool GlobalMergeImpl::run(Module &M) {
737738 else
738739 Globals[{AddressSpace, Section}].push_back (&GV);
739740 }
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 " );
745743 }
746744
747745 for (auto &P : Globals)
You can’t perform that action at this time.
0 commit comments