mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
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). llvm-svn: 194101
This commit is contained in:
parent
934454ceaf
commit
48fa7b701b
@ -203,14 +203,13 @@ namespace {
|
|||||||
unsigned LongFormOpcode;
|
unsigned LongFormOpcode;
|
||||||
public:
|
public:
|
||||||
bool NegOk;
|
bool NegOk;
|
||||||
bool IsSoImm;
|
|
||||||
bool KnownAlignment;
|
bool KnownAlignment;
|
||||||
CPUser(MachineInstr *mi, MachineInstr *cpemi, unsigned maxdisp,
|
CPUser(MachineInstr *mi, MachineInstr *cpemi, unsigned maxdisp,
|
||||||
bool neg, bool soimm,
|
bool neg,
|
||||||
unsigned longformmaxdisp, unsigned longformopcode)
|
unsigned longformmaxdisp, unsigned longformopcode)
|
||||||
: MI(mi), CPEMI(cpemi), MaxDisp(maxdisp),
|
: MI(mi), CPEMI(cpemi), MaxDisp(maxdisp),
|
||||||
LongFormMaxDisp(longformmaxdisp), LongFormOpcode(longformopcode),
|
LongFormMaxDisp(longformmaxdisp), LongFormOpcode(longformopcode),
|
||||||
NegOk(neg), IsSoImm(soimm), KnownAlignment(false) {
|
NegOk(neg), KnownAlignment(false) {
|
||||||
HighWaterMark = CPEMI->getParent();
|
HighWaterMark = CPEMI->getParent();
|
||||||
}
|
}
|
||||||
/// getMaxDisp - Returns the maximum displacement supported by MI.
|
/// getMaxDisp - Returns the maximum displacement supported by MI.
|
||||||
@ -318,7 +317,7 @@ namespace {
|
|||||||
void verify();
|
void verify();
|
||||||
|
|
||||||
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
|
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
|
||||||
unsigned Disp, bool NegativeOK, bool IsSoImm = false);
|
unsigned Disp, bool NegativeOK);
|
||||||
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
|
bool isOffsetInRange(unsigned UserOffset, unsigned TrialOffset,
|
||||||
const CPUser &U);
|
const CPUser &U);
|
||||||
|
|
||||||
@ -363,14 +362,14 @@ bool MipsConstantIslands::isLongFormOffsetInRange
|
|||||||
(unsigned UserOffset, unsigned TrialOffset,
|
(unsigned UserOffset, unsigned TrialOffset,
|
||||||
const CPUser &U) {
|
const CPUser &U) {
|
||||||
return isOffsetInRange(UserOffset, TrialOffset,
|
return isOffsetInRange(UserOffset, TrialOffset,
|
||||||
U.getLongFormMaxDisp(), U.NegOk, U.IsSoImm);
|
U.getLongFormMaxDisp(), U.NegOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MipsConstantIslands::isOffsetInRange
|
bool MipsConstantIslands::isOffsetInRange
|
||||||
(unsigned UserOffset, unsigned TrialOffset,
|
(unsigned UserOffset, unsigned TrialOffset,
|
||||||
const CPUser &U) {
|
const CPUser &U) {
|
||||||
return isOffsetInRange(UserOffset, TrialOffset,
|
return isOffsetInRange(UserOffset, TrialOffset,
|
||||||
U.getMaxDisp(), U.NegOk, U.IsSoImm);
|
U.getMaxDisp(), U.NegOk);
|
||||||
}
|
}
|
||||||
/// print block size and offset information - debugging
|
/// print block size and offset information - debugging
|
||||||
void MipsConstantIslands::dumpBBs() {
|
void MipsConstantIslands::dumpBBs() {
|
||||||
@ -664,7 +663,6 @@ initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
|
|||||||
unsigned Bits = 0;
|
unsigned Bits = 0;
|
||||||
unsigned Scale = 1;
|
unsigned Scale = 1;
|
||||||
bool NegOk = false;
|
bool NegOk = false;
|
||||||
bool IsSoImm = false;
|
|
||||||
unsigned LongFormBits = 0;
|
unsigned LongFormBits = 0;
|
||||||
unsigned LongFormScale = 0;
|
unsigned LongFormScale = 0;
|
||||||
unsigned LongFormOpcode = 0;
|
unsigned LongFormOpcode = 0;
|
||||||
@ -687,8 +685,7 @@ initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
|
|||||||
unsigned MaxOffs = ((1 << Bits)-1) * Scale;
|
unsigned MaxOffs = ((1 << Bits)-1) * Scale;
|
||||||
unsigned LongFormMaxOffs = ((1 << LongFormBits)-1) * LongFormScale;
|
unsigned LongFormMaxOffs = ((1 << LongFormBits)-1) * LongFormScale;
|
||||||
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs, NegOk,
|
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs, NegOk,
|
||||||
IsSoImm, LongFormMaxOffs,
|
LongFormMaxOffs, LongFormOpcode));
|
||||||
LongFormOpcode));
|
|
||||||
|
|
||||||
// Increment corresponding CPEntry reference count.
|
// Increment corresponding CPEntry reference count.
|
||||||
CPEntry *CPE = findConstPoolEntry(CPI, CPEMI);
|
CPEntry *CPE = findConstPoolEntry(CPI, CPEMI);
|
||||||
@ -849,16 +846,14 @@ MachineBasicBlock *MipsConstantIslands::splitBlockBeforeInstr
|
|||||||
/// subtracted from MaxDisp instead. CPUser::getMaxDisp() does that.
|
/// subtracted from MaxDisp instead. CPUser::getMaxDisp() does that.
|
||||||
bool MipsConstantIslands::isOffsetInRange(unsigned UserOffset,
|
bool MipsConstantIslands::isOffsetInRange(unsigned UserOffset,
|
||||||
unsigned TrialOffset, unsigned MaxDisp,
|
unsigned TrialOffset, unsigned MaxDisp,
|
||||||
bool NegativeOK, bool IsSoImm) {
|
bool NegativeOK) {
|
||||||
if (UserOffset <= TrialOffset) {
|
if (UserOffset <= TrialOffset) {
|
||||||
// User before the Trial.
|
// User before the Trial.
|
||||||
if (TrialOffset - UserOffset <= MaxDisp)
|
if (TrialOffset - UserOffset <= MaxDisp)
|
||||||
return true;
|
return true;
|
||||||
// FIXME: Make use full range of soimm values.
|
|
||||||
} else if (NegativeOK) {
|
} else if (NegativeOK) {
|
||||||
if (UserOffset - TrialOffset <= MaxDisp)
|
if (UserOffset - TrialOffset <= MaxDisp)
|
||||||
return true;
|
return true;
|
||||||
// FIXME: Make use full range of soimm values.
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user