aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-07-11 18:32:38 +0000
committerDale Johannesen <dalej@apple.com>2007-07-11 18:32:38 +0000
commit5d9c4b60204d741c213456e21b87e9af6a3dc627 (patch)
tree6ebfb96e39df2b6a5c08d8dece600ceafc592c13 /lib/Target/ARM
parent75ce010f7b6a47d9656e546b5db4a9cd77ba1dee (diff)
downloadexternal_llvm-5d9c4b60204d741c213456e21b87e9af6a3dc627.zip
external_llvm-5d9c4b60204d741c213456e21b87e9af6a3dc627.tar.gz
external_llvm-5d9c4b60204d741c213456e21b87e9af6a3dc627.tar.bz2
Fix hang compiling TimberWolf (allow for islands
of size other than 4). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index dd65dd9..13b812c 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -161,7 +161,7 @@ namespace {
MachineInstr *CPEMI, unsigned Disp,
bool DoDump);
bool WaterIsInRange(unsigned UserOffset, MachineBasicBlock *Water,
- unsigned Disp);
+ CPUser &U);
bool OffsetIsInRange(unsigned UserOffset, unsigned TrialOffset,
unsigned Disp, bool NegativeOK);
bool BBIsInRange(MachineInstr *MI, MachineBasicBlock *BB, unsigned Disp);
@@ -199,8 +199,8 @@ void ARMConstantIslands::verify(MachineFunction &Fn) {
/// print block size and offset information - debugging
void ARMConstantIslands::dumpBBs() {
for (unsigned J = 0, E = BBOffsets.size(); J !=E; ++J) {
- DOUT << "block" << J << " offset" << BBOffsets[J] <<
- " size" << BBSizes[J] << "\n";
+ DOUT << "block " << J << " offset " << BBOffsets[J] <<
+ " size " << BBSizes[J] << "\n";
}
}
@@ -668,8 +668,9 @@ bool ARMConstantIslands::OffsetIsInRange(unsigned UserOffset,
/// Water (a basic block) will be in range for the specific MI.
bool ARMConstantIslands::WaterIsInRange(unsigned UserOffset,
- MachineBasicBlock* Water, unsigned MaxDisp)
+ MachineBasicBlock* Water, CPUser &U)
{
+ unsigned MaxDisp = U.MaxDisp;
MachineFunction::iterator I = next(MachineFunction::iterator(Water));
unsigned CPEOffset = BBOffsets[Water->getNumber()] +
BBSizes[Water->getNumber()];
@@ -678,7 +679,7 @@ bool ARMConstantIslands::WaterIsInRange(unsigned UserOffset,
// the offset of the instruction. (Currently applies only to ARM, so
// no alignment compensation attempted here.)
if (CPEOffset < UserOffset)
- UserOffset += 4;
+ UserOffset += U.CPEMI->getOperand(2).getImm();
return OffsetIsInRange (UserOffset, CPEOffset, MaxDisp, !isThumb);
}
@@ -869,7 +870,7 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
for (std::vector<MachineBasicBlock*>::iterator IP = prior(WaterList.end()),
B = WaterList.begin();; --IP) {
MachineBasicBlock* WaterBB = *IP;
- if (WaterIsInRange(UserOffset, WaterBB, U.MaxDisp)) {
+ if (WaterIsInRange(UserOffset, WaterBB, U)) {
if (isThumb &&
(BBOffsets[WaterBB->getNumber()] +
BBSizes[WaterBB->getNumber()])%4 != 0) {