mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
ARM: allow constpool entry to be moved to the user's block in all cases.
Normally entries can only move to a lower address, but when that wasn't viable, the user's block was considered anyway. Unfortunately, it went via createNewWater which wasn't designed to handle the case where there's already an island after the block. Unfortunately, the test we have is slow and fragile, and I couldn't reduce it to anything sane even with the @llvm.arm.space intrinsic. The test change here is recreating the previous one after the change. rdar://problem/18545506 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221905 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1207,7 +1207,8 @@ bool ARMConstantIslands::findAvailableWater(CPUser &U, unsigned UserOffset,
|
||||
unsigned Growth;
|
||||
if (isWaterInRange(UserOffset, WaterBB, U, Growth) &&
|
||||
(WaterBB->getNumber() < U.HighWaterMark->getNumber() ||
|
||||
NewWaterList.count(WaterBB)) && Growth < BestGrowth) {
|
||||
NewWaterList.count(WaterBB) || WaterBB == U.MI->getParent()) &&
|
||||
Growth < BestGrowth) {
|
||||
// This is the least amount of required padding seen so far.
|
||||
BestGrowth = Growth;
|
||||
WaterIter = IP;
|
||||
@@ -1361,6 +1362,11 @@ void ARMConstantIslands::createNewWater(unsigned CPUserIndex,
|
||||
if (CC != ARMCC::AL)
|
||||
MI = LastIT;
|
||||
}
|
||||
|
||||
// We really must not split an IT block.
|
||||
DEBUG(unsigned PredReg;
|
||||
assert(!isThumb || getITInstrPredicate(MI, PredReg) == ARMCC::AL));
|
||||
|
||||
NewMBB = splitBlockBeforeInstr(MI);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user