mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00: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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1fa282d635
commit
14cfb10174
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user