aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-11-05 22:34:29 +0000
committerReed Kotler <rkotler@mips.com>2013-11-05 22:34:29 +0000
commit14cfb10174fa443074c235a207d290a9816392f8 (patch)
treee8466b59f5e9f31b50553e293bf16256057a9d52
parent1fa282d63538477d686015ad1883fa44d5e12605 (diff)
downloadexternal_llvm-14cfb10174fa443074c235a207d290a9816392f8.zip
external_llvm-14cfb10174fa443074c235a207d290a9816392f8.tar.gz
external_llvm-14cfb10174fa443074c235a207d290a9816392f8.tar.bz2
Get rid of all references to soimm in MipsConstantIslands pass because
we don't have such an operand. Suprisingly enough, this is never actually accounted for in the ARM version when determining offset ranges. In both places there is the comment: - // FIXME: Make use full range of soimm values. (soimm = shift operand immediate). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194101 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/Mips/MipsConstantIslandPass.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/Target/Mips/MipsConstantIslandPass.cpp b/lib/Target/Mips/MipsConstantIslandPass.cpp
index 36b5314..67394fa 100644
--- a/lib/Target/Mips/MipsConstantIslandPass.cpp
+++ b/lib/Target/Mips/MipsConstantIslandPass.cpp
@@ -203,14 +203,13 @@ namespace {
unsigned LongFormOpcode;
public:
bool NegOk;
- bool IsSoImm;
bool KnownAlignment;
CPUser(MachineInstr *mi, MachineInstr *cpemi, unsigned maxdisp,
- bool neg, bool soimm,
+ bool neg,
unsigned longformmaxdisp, unsigned longformopcode)
: MI(mi), CPEMI(cpemi), MaxDisp(maxdisp),
LongFormMaxDisp(longformmaxdisp), LongFormOpcode(longformopcode),
- NegOk(neg), IsSoImm(soimm), KnownAlignment(false) {
+ NegOk(neg), KnownAlignment(false) {
HighWaterMark = CPEMI->getParent();
}
/// getMaxDisp - Returns the maximum displacement supported by MI.
@@ -318,7 +317,7 @@ namespace {
void verify();
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
- unsigned Disp, bool NegativeOK, bool IsSoImm = false);
+ unsigned Disp, bool NegativeOK);
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
const CPUser &U);
@@ -363,14 +362,14 @@ bool MipsConstantIslands::isLongFormOffsetInRange
(unsigned UserOffset, unsigned TrialOffset,
const CPUser &U) {
return isOffsetInRange(UserOffset, TrialOffset,
- U.getLongFormMaxDisp(), U.NegOk, U.IsSoImm);
+ U.getLongFormMaxDisp(), U.NegOk);
}
bool MipsConstantIslands::isOffsetInRange
(unsigned UserOffset, unsigned TrialOffset,
const CPUser &U) {
return isOffsetInRange(UserOffset, TrialOffset,
- U.getMaxDisp(), U.NegOk, U.IsSoImm);
+ U.getMaxDisp(), U.NegOk);
}
/// print block size and offset information - debugging
void MipsConstantIslands::dumpBBs() {
@@ -664,7 +663,6 @@ initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
unsigned Bits = 0;
unsigned Scale = 1;
bool NegOk = false;
- bool IsSoImm = false;
unsigned LongFormBits = 0;
unsigned LongFormScale = 0;
unsigned LongFormOpcode = 0;
@@ -687,8 +685,7 @@ initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
unsigned MaxOffs = ((1 << Bits)-1) * Scale;
unsigned LongFormMaxOffs = ((1 << LongFormBits)-1) * LongFormScale;
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs, NegOk,
- IsSoImm, LongFormMaxOffs,
- LongFormOpcode));
+ LongFormMaxOffs, LongFormOpcode));
// Increment corresponding CPEntry reference count.
CPEntry *CPE = findConstPoolEntry(CPI, CPEMI);
@@ -849,16 +846,14 @@ MachineBasicBlock *MipsConstantIslands::splitBlockBeforeInstr
/// subtracted from MaxDisp instead. CPUser::getMaxDisp() does that.
bool MipsConstantIslands::isOffsetInRange(unsigned UserOffset,
unsigned TrialOffset, unsigned MaxDisp,
- bool NegativeOK, bool IsSoImm) {
+ bool NegativeOK) {
if (UserOffset <= TrialOffset) {
// User before the Trial.
if (TrialOffset - UserOffset <= MaxDisp)
return true;
- // FIXME: Make use full range of soimm values.
} else if (NegativeOK) {
if (UserOffset - TrialOffset <= MaxDisp)
return true;
- // FIXME: Make use full range of soimm values.
}
return false;
}