Skip to content

Commit 96cb8d4

Browse files
committed
Rebase after llvm#112960
1 parent 731158b commit 96cb8d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/LiveIntervals.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,7 @@ float LiveIntervals::getSpillWeight(bool isDef, bool isUse,
890890
const auto *MF = MBB->getParent();
891891
// When optimizing for size we only consider the codesize impact of spilling
892892
// the register, not the runtime impact.
893-
if (PSI && (MF->getFunction().hasOptSize() ||
894-
llvm::shouldOptimizeForSize(MF, PSI, MBFI)))
893+
if (PSI && llvm::shouldOptimizeForSize(MF, PSI, MBFI))
895894
return Weight;
896895
return Weight * MBFI->getBlockFreqRelativeToEntryBlock(MBB);
897896
}

0 commit comments

Comments
 (0)