From: Reed Kotler Date: Tue, 5 Nov 2013 22:34:29 +0000 (+0000) Subject: Get rid of all references to soimm in MipsConstantIslands pass because X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=14cfb10174fa443074c235a207d290a9816392f8;p=oota-llvm.git 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 --- diff --git a/lib/Target/Mips/MipsConstantIslandPass.cpp b/lib/Target/Mips/MipsConstantIslandPass.cpp index 36b53148725..67394fa778c 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 &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 &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; }