mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Remove unnecessary llvm:: qualifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4549e1c0e
commit
c89c744b69
@ -107,7 +107,7 @@ public:
|
|||||||
if (!Subtarget->isTargetDarwin())
|
if (!Subtarget->isTargetDarwin())
|
||||||
return 0;
|
return 0;
|
||||||
return Subtarget->isThumb() ?
|
return Subtarget->isThumb() ?
|
||||||
llvm::ARM::DW_ISA_ARM_thumb : llvm::ARM::DW_ISA_ARM_arm;
|
ARM::DW_ISA_ARM_thumb : ARM::DW_ISA_ARM_arm;
|
||||||
}
|
}
|
||||||
|
|
||||||
MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol);
|
MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol);
|
||||||
|
@ -1354,7 +1354,7 @@ void ARMConstantIslands::createNewWater(unsigned CPUserIndex,
|
|||||||
// Avoid splitting an IT block.
|
// Avoid splitting an IT block.
|
||||||
if (LastIT) {
|
if (LastIT) {
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes CC = llvm::getITInstrPredicate(MI, PredReg);
|
ARMCC::CondCodes CC = getITInstrPredicate(MI, PredReg);
|
||||||
if (CC != ARMCC::AL)
|
if (CC != ARMCC::AL)
|
||||||
MI = LastIT;
|
MI = LastIT;
|
||||||
}
|
}
|
||||||
@ -1799,7 +1799,7 @@ bool ARMConstantIslands::optimizeThumb2Branches() {
|
|||||||
|
|
||||||
NewOpc = 0;
|
NewOpc = 0;
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(Br.MI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(Br.MI, PredReg);
|
||||||
if (Pred == ARMCC::EQ)
|
if (Pred == ARMCC::EQ)
|
||||||
NewOpc = ARM::tCBZ;
|
NewOpc = ARM::tCBZ;
|
||||||
else if (Pred == ARMCC::NE)
|
else if (Pred == ARMCC::NE)
|
||||||
@ -1817,7 +1817,7 @@ bool ARMConstantIslands::optimizeThumb2Branches() {
|
|||||||
--CmpMI;
|
--CmpMI;
|
||||||
if (CmpMI->getOpcode() == ARM::tCMPi8) {
|
if (CmpMI->getOpcode() == ARM::tCMPi8) {
|
||||||
unsigned Reg = CmpMI->getOperand(0).getReg();
|
unsigned Reg = CmpMI->getOperand(0).getReg();
|
||||||
Pred = llvm::getInstrPredicate(CmpMI, PredReg);
|
Pred = getInstrPredicate(CmpMI, PredReg);
|
||||||
if (Pred == ARMCC::AL &&
|
if (Pred == ARMCC::AL &&
|
||||||
CmpMI->getOperand(1).getImm() == 0 &&
|
CmpMI->getOperand(1).getImm() == 0 &&
|
||||||
isARMLowRegister(Reg)) {
|
isARMLowRegister(Reg)) {
|
||||||
|
@ -612,7 +612,7 @@ void ARMExpandPseudo::ExpandMOV32BitImm(MachineBasicBlock &MBB,
|
|||||||
MachineInstr &MI = *MBBI;
|
MachineInstr &MI = *MBBI;
|
||||||
unsigned Opcode = MI.getOpcode();
|
unsigned Opcode = MI.getOpcode();
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(&MI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(&MI, PredReg);
|
||||||
unsigned DstReg = MI.getOperand(0).getReg();
|
unsigned DstReg = MI.getOperand(0).getReg();
|
||||||
bool DstIsDead = MI.getOperand(0).isDead();
|
bool DstIsDead = MI.getOperand(0).isDead();
|
||||||
bool isCC = Opcode == ARM::MOVCCi32imm || Opcode == ARM::t2MOVCCi32imm;
|
bool isCC = Opcode == ARM::MOVCCi32imm || Opcode == ARM::t2MOVCCi32imm;
|
||||||
@ -793,15 +793,15 @@ bool ARMExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
|
|||||||
"base pointer without frame pointer?");
|
"base pointer without frame pointer?");
|
||||||
|
|
||||||
if (AFI->isThumb2Function()) {
|
if (AFI->isThumb2Function()) {
|
||||||
llvm::emitT2RegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
emitT2RegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
||||||
FramePtr, -NumBytes, ARMCC::AL, 0, *TII);
|
FramePtr, -NumBytes, ARMCC::AL, 0, *TII);
|
||||||
} else if (AFI->isThumbFunction()) {
|
} else if (AFI->isThumbFunction()) {
|
||||||
llvm::emitThumbRegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
emitThumbRegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
||||||
FramePtr, -NumBytes, *TII, RI);
|
FramePtr, -NumBytes, *TII, RI);
|
||||||
} else {
|
} else {
|
||||||
llvm::emitARMRegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
emitARMRegPlusImmediate(MBB, MBBI, MI.getDebugLoc(), ARM::R6,
|
||||||
FramePtr, -NumBytes, ARMCC::AL, 0,
|
FramePtr, -NumBytes, ARMCC::AL, 0,
|
||||||
*TII);
|
*TII);
|
||||||
}
|
}
|
||||||
// If there's dynamic realignment, adjust for it.
|
// If there's dynamic realignment, adjust for it.
|
||||||
if (RI.needsStackRealignment(MF)) {
|
if (RI.needsStackRealignment(MF)) {
|
||||||
|
@ -2638,7 +2638,7 @@ bool ARMFastISel::TryToFoldLoad(MachineInstr *MI, unsigned OpNo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
|
FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
|
||||||
// Completely untested on non-iOS.
|
// Completely untested on non-iOS.
|
||||||
const TargetMachine &TM = funcInfo.MF->getTarget();
|
const TargetMachine &TM = funcInfo.MF->getTarget();
|
||||||
|
|
||||||
|
@ -1641,7 +1641,7 @@ ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
|||||||
/// and then confiscate the rest of the parameter registers to insure
|
/// and then confiscate the rest of the parameter registers to insure
|
||||||
/// this.
|
/// this.
|
||||||
void
|
void
|
||||||
llvm::ARMTargetLowering::HandleByVal(CCState *State, unsigned &size) const {
|
ARMTargetLowering::HandleByVal(CCState *State, unsigned &size) const {
|
||||||
unsigned reg = State->AllocateReg(GPRArgRegs, 4);
|
unsigned reg = State->AllocateReg(GPRArgRegs, 4);
|
||||||
assert((State->getCallOrPrologue() == Prologue ||
|
assert((State->getCallOrPrologue() == Prologue ||
|
||||||
State->getCallOrPrologue() == Call) &&
|
State->getCallOrPrologue() == Call) &&
|
||||||
|
@ -537,7 +537,7 @@ static bool isMatchingDecrement(MachineInstr *MI, unsigned Base,
|
|||||||
if (!(MI->getOperand(0).getReg() == Base &&
|
if (!(MI->getOperand(0).getReg() == Base &&
|
||||||
MI->getOperand(1).getReg() == Base &&
|
MI->getOperand(1).getReg() == Base &&
|
||||||
(MI->getOperand(2).getImm()*Scale) == Bytes &&
|
(MI->getOperand(2).getImm()*Scale) == Bytes &&
|
||||||
llvm::getInstrPredicate(MI, MyPredReg) == Pred &&
|
getInstrPredicate(MI, MyPredReg) == Pred &&
|
||||||
MyPredReg == PredReg))
|
MyPredReg == PredReg))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -570,7 +570,7 @@ static bool isMatchingIncrement(MachineInstr *MI, unsigned Base,
|
|||||||
if (!(MI->getOperand(0).getReg() == Base &&
|
if (!(MI->getOperand(0).getReg() == Base &&
|
||||||
MI->getOperand(1).getReg() == Base &&
|
MI->getOperand(1).getReg() == Base &&
|
||||||
(MI->getOperand(2).getImm()*Scale) == Bytes &&
|
(MI->getOperand(2).getImm()*Scale) == Bytes &&
|
||||||
llvm::getInstrPredicate(MI, MyPredReg) == Pred &&
|
getInstrPredicate(MI, MyPredReg) == Pred &&
|
||||||
MyPredReg == PredReg))
|
MyPredReg == PredReg))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -701,7 +701,7 @@ bool ARMLoadStoreOpt::MergeBaseUpdateLSMultiple(MachineBasicBlock &MBB,
|
|||||||
bool BaseKill = MI->getOperand(0).isKill();
|
bool BaseKill = MI->getOperand(0).isKill();
|
||||||
unsigned Bytes = getLSMultipleTransferSize(MI);
|
unsigned Bytes = getLSMultipleTransferSize(MI);
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(MI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(MI, PredReg);
|
||||||
int Opcode = MI->getOpcode();
|
int Opcode = MI->getOpcode();
|
||||||
DebugLoc dl = MI->getDebugLoc();
|
DebugLoc dl = MI->getDebugLoc();
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ bool ARMLoadStoreOpt::MergeBaseUpdateLoadStore(MachineBasicBlock &MBB,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(MI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(MI, PredReg);
|
||||||
bool DoMerge = false;
|
bool DoMerge = false;
|
||||||
ARM_AM::AddrOpc AddSub = ARM_AM::add;
|
ARM_AM::AddrOpc AddSub = ARM_AM::add;
|
||||||
unsigned NewOpc = 0;
|
unsigned NewOpc = 0;
|
||||||
@ -1112,7 +1112,7 @@ bool ARMLoadStoreOpt::FixInvalidRegPairOp(MachineBasicBlock &MBB,
|
|||||||
bool OffUndef = isT2 ? false : MI->getOperand(3).isUndef();
|
bool OffUndef = isT2 ? false : MI->getOperand(3).isUndef();
|
||||||
int OffImm = getMemoryOpOffset(MI);
|
int OffImm = getMemoryOpOffset(MI);
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(MI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(MI, PredReg);
|
||||||
|
|
||||||
if (OddRegNum > EvenRegNum && OffImm == 0) {
|
if (OddRegNum > EvenRegNum && OffImm == 0) {
|
||||||
// Ascending register numbers and no offset. It's safe to change it to a
|
// Ascending register numbers and no offset. It's safe to change it to a
|
||||||
@ -1223,7 +1223,7 @@ bool ARMLoadStoreOpt::LoadStoreMultipleOpti(MachineBasicBlock &MBB) {
|
|||||||
bool isKill = MO.isDef() ? false : MO.isKill();
|
bool isKill = MO.isDef() ? false : MO.isKill();
|
||||||
unsigned Base = MBBI->getOperand(1).getReg();
|
unsigned Base = MBBI->getOperand(1).getReg();
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(MBBI, PredReg);
|
ARMCC::CondCodes Pred = getInstrPredicate(MBBI, PredReg);
|
||||||
int Offset = getMemoryOpOffset(MBBI);
|
int Offset = getMemoryOpOffset(MBBI);
|
||||||
// Watch out for:
|
// Watch out for:
|
||||||
// r4 := ldr [r5]
|
// r4 := ldr [r5]
|
||||||
@ -1599,7 +1599,7 @@ ARMPreAllocLoadStoreOpt::CanFormLdStDWord(MachineInstr *Op0, MachineInstr *Op1,
|
|||||||
if (EvenReg == OddReg)
|
if (EvenReg == OddReg)
|
||||||
return false;
|
return false;
|
||||||
BaseReg = Op0->getOperand(1).getReg();
|
BaseReg = Op0->getOperand(1).getReg();
|
||||||
Pred = llvm::getInstrPredicate(Op0, PredReg);
|
Pred = getInstrPredicate(Op0, PredReg);
|
||||||
dl = Op0->getDebugLoc();
|
dl = Op0->getDebugLoc();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1796,7 +1796,7 @@ ARMPreAllocLoadStoreOpt::RescheduleLoadStoreInstrs(MachineBasicBlock *MBB) {
|
|||||||
if (!isMemoryOp(MI))
|
if (!isMemoryOp(MI))
|
||||||
continue;
|
continue;
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
if (llvm::getInstrPredicate(MI, PredReg) != ARMCC::AL)
|
if (getInstrPredicate(MI, PredReg) != ARMCC::AL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int Opc = MI->getOpcode();
|
int Opc = MI->getOpcode();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1330,8 +1330,8 @@ getRegisterListOpValue(const MCInst &MI, unsigned Op,
|
|||||||
// LDM/STM:
|
// LDM/STM:
|
||||||
// {15-0} = Bitfield of GPRs.
|
// {15-0} = Bitfield of GPRs.
|
||||||
unsigned Reg = MI.getOperand(Op).getReg();
|
unsigned Reg = MI.getOperand(Op).getReg();
|
||||||
bool SPRRegs = llvm::ARMMCRegisterClasses[ARM::SPRRegClassID].contains(Reg);
|
bool SPRRegs = ARMMCRegisterClasses[ARM::SPRRegClassID].contains(Reg);
|
||||||
bool DPRRegs = llvm::ARMMCRegisterClasses[ARM::DPRRegClassID].contains(Reg);
|
bool DPRRegs = ARMMCRegisterClasses[ARM::DPRRegClassID].contains(Reg);
|
||||||
|
|
||||||
unsigned Binary = 0;
|
unsigned Binary = 0;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ Thumb2ITBlockPass::MoveCopyOutOfITBlock(MachineInstr *MI,
|
|||||||
++I;
|
++I;
|
||||||
if (I != E) {
|
if (I != E) {
|
||||||
unsigned NPredReg = 0;
|
unsigned NPredReg = 0;
|
||||||
ARMCC::CondCodes NCC = llvm::getITInstrPredicate(I, NPredReg);
|
ARMCC::CondCodes NCC = getITInstrPredicate(I, NPredReg);
|
||||||
if (NCC == CC || NCC == OCC)
|
if (NCC == CC || NCC == OCC)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ bool Thumb2ITBlockPass::InsertITInstructions(MachineBasicBlock &MBB) {
|
|||||||
MachineInstr *MI = &*MBBI;
|
MachineInstr *MI = &*MBBI;
|
||||||
DebugLoc dl = MI->getDebugLoc();
|
DebugLoc dl = MI->getDebugLoc();
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes CC = llvm::getITInstrPredicate(MI, PredReg);
|
ARMCC::CondCodes CC = getITInstrPredicate(MI, PredReg);
|
||||||
if (CC == ARMCC::AL) {
|
if (CC == ARMCC::AL) {
|
||||||
++MBBI;
|
++MBBI;
|
||||||
continue;
|
continue;
|
||||||
@ -207,7 +207,7 @@ bool Thumb2ITBlockPass::InsertITInstructions(MachineBasicBlock &MBB) {
|
|||||||
MI = NMI;
|
MI = NMI;
|
||||||
|
|
||||||
unsigned NPredReg = 0;
|
unsigned NPredReg = 0;
|
||||||
ARMCC::CondCodes NCC = llvm::getITInstrPredicate(NMI, NPredReg);
|
ARMCC::CondCodes NCC = getITInstrPredicate(NMI, NPredReg);
|
||||||
if (NCC == CC || NCC == OCC) {
|
if (NCC == CC || NCC == OCC) {
|
||||||
Mask |= (NCC & 1) << Pos;
|
Mask |= (NCC & 1) << Pos;
|
||||||
// Add implicit use of ITSTATE.
|
// Add implicit use of ITSTATE.
|
||||||
|
@ -59,7 +59,7 @@ Thumb2InstrInfo::ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail,
|
|||||||
// If the first instruction of Tail is predicated, we may have to update
|
// If the first instruction of Tail is predicated, we may have to update
|
||||||
// the IT instruction.
|
// the IT instruction.
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes CC = llvm::getInstrPredicate(Tail, PredReg);
|
ARMCC::CondCodes CC = getInstrPredicate(Tail, PredReg);
|
||||||
MachineBasicBlock::iterator MBBI = Tail;
|
MachineBasicBlock::iterator MBBI = Tail;
|
||||||
if (CC != ARMCC::AL)
|
if (CC != ARMCC::AL)
|
||||||
// Expecting at least the t2IT instruction before it.
|
// Expecting at least the t2IT instruction before it.
|
||||||
@ -107,7 +107,7 @@ Thumb2InstrInfo::isLegalToSplitMBBAt(MachineBasicBlock &MBB,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
return llvm::getITInstrPredicate(MBBI, PredReg) == ARMCC::AL;
|
return getITInstrPredicate(MBBI, PredReg) == ARMCC::AL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Thumb2InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
void Thumb2InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||||
@ -574,7 +574,7 @@ Thumb2InstrInfo::scheduleTwoAddrSource(MachineInstr *SrcMI,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
ARMCC::CondCodes CC = llvm::getInstrPredicate(UseMI, PredReg);
|
ARMCC::CondCodes CC = getInstrPredicate(UseMI, PredReg);
|
||||||
if (CC == ARMCC::AL || PredReg != ARM::CPSR)
|
if (CC == ARMCC::AL || PredReg != ARM::CPSR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ Thumb2InstrInfo::scheduleTwoAddrSource(MachineInstr *SrcMI,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
MachineInstr *NMI = &*MBBI;
|
MachineInstr *NMI = &*MBBI;
|
||||||
ARMCC::CondCodes NCC = llvm::getInstrPredicate(NMI, PredReg);
|
ARMCC::CondCodes NCC = getInstrPredicate(NMI, PredReg);
|
||||||
if (!(NCC == CC || NCC == OCC) ||
|
if (!(NCC == CC || NCC == OCC) ||
|
||||||
NMI->modifiesRegister(SrcReg, &TRI) ||
|
NMI->modifiesRegister(SrcReg, &TRI) ||
|
||||||
NMI->modifiesRegister(ARM::CPSR, &TRI))
|
NMI->modifiesRegister(ARM::CPSR, &TRI))
|
||||||
@ -611,5 +611,5 @@ llvm::getITInstrPredicate(const MachineInstr *MI, unsigned &PredReg) {
|
|||||||
unsigned Opc = MI->getOpcode();
|
unsigned Opc = MI->getOpcode();
|
||||||
if (Opc == ARM::tBcc || Opc == ARM::t2Bcc)
|
if (Opc == ARM::tBcc || Opc == ARM::t2Bcc)
|
||||||
return ARMCC::AL;
|
return ARMCC::AL;
|
||||||
return llvm::getInstrPredicate(MI, PredReg);
|
return getInstrPredicate(MI, PredReg);
|
||||||
}
|
}
|
||||||
|
@ -3224,7 +3224,7 @@ bool SPUTargetLowering::isLegalAddressImmediate(int64_t V,
|
|||||||
return (V > -(1 << 18) && V < (1 << 18) - 1);
|
return (V > -(1 << 18) && V < (1 << 18) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SPUTargetLowering::isLegalAddressImmediate(llvm::GlobalValue* GV) const {
|
bool SPUTargetLowering::isLegalAddressImmediate(GlobalValue* GV) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,13 +211,13 @@ static void analyzeFrameIndexes(MachineFunction &MF) {
|
|||||||
|
|
||||||
static void interruptFrameLayout(MachineFunction &MF) {
|
static void interruptFrameLayout(MachineFunction &MF) {
|
||||||
const Function *F = MF.getFunction();
|
const Function *F = MF.getFunction();
|
||||||
llvm::CallingConv::ID CallConv = F->getCallingConv();
|
CallingConv::ID CallConv = F->getCallingConv();
|
||||||
|
|
||||||
// If this function is not using either the interrupt_handler
|
// If this function is not using either the interrupt_handler
|
||||||
// calling convention or the save_volatiles calling convention
|
// calling convention or the save_volatiles calling convention
|
||||||
// then we don't need to do any additional frame layout.
|
// then we don't need to do any additional frame layout.
|
||||||
if (CallConv != llvm::CallingConv::MBLAZE_INTR &&
|
if (CallConv != CallingConv::MBLAZE_INTR &&
|
||||||
CallConv != llvm::CallingConv::MBLAZE_SVOL)
|
CallConv != CallingConv::MBLAZE_SVOL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
@ -228,7 +228,7 @@ static void interruptFrameLayout(MachineFunction &MF) {
|
|||||||
// Determine if the calling convention is the interrupt_handler
|
// Determine if the calling convention is the interrupt_handler
|
||||||
// calling convention. Some pieces of the prologue and epilogue
|
// calling convention. Some pieces of the prologue and epilogue
|
||||||
// only need to be emitted if we are lowering and interrupt handler.
|
// only need to be emitted if we are lowering and interrupt handler.
|
||||||
bool isIntr = CallConv == llvm::CallingConv::MBLAZE_INTR;
|
bool isIntr = CallConv == CallingConv::MBLAZE_INTR;
|
||||||
|
|
||||||
// Determine where to put prologue and epilogue additions
|
// Determine where to put prologue and epilogue additions
|
||||||
MachineBasicBlock &MENT = MF.front();
|
MachineBasicBlock &MENT = MF.front();
|
||||||
@ -347,8 +347,8 @@ void MBlazeFrameLowering::emitPrologue(MachineFunction &MF) const {
|
|||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||||
|
|
||||||
llvm::CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
||||||
bool requiresRA = CallConv == llvm::CallingConv::MBLAZE_INTR;
|
bool requiresRA = CallConv == CallingConv::MBLAZE_INTR;
|
||||||
|
|
||||||
// Determine the correct frame layout
|
// Determine the correct frame layout
|
||||||
determineFrameLayout(MF);
|
determineFrameLayout(MF);
|
||||||
@ -393,8 +393,8 @@ void MBlazeFrameLowering::emitEpilogue(MachineFunction &MF,
|
|||||||
|
|
||||||
DebugLoc dl = MBBI->getDebugLoc();
|
DebugLoc dl = MBBI->getDebugLoc();
|
||||||
|
|
||||||
llvm::CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
||||||
bool requiresRA = CallConv == llvm::CallingConv::MBLAZE_INTR;
|
bool requiresRA = CallConv == CallingConv::MBLAZE_INTR;
|
||||||
|
|
||||||
// Get the FI's where RA and FP are saved.
|
// Get the FI's where RA and FP are saved.
|
||||||
int FPOffset = MBlazeFI->getFPStackOffset();
|
int FPOffset = MBlazeFI->getFPStackOffset();
|
||||||
@ -431,8 +431,8 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|||||||
RegScavenger *RS) const {
|
RegScavenger *RS) const {
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
MBlazeFunctionInfo *MBlazeFI = MF.getInfo<MBlazeFunctionInfo>();
|
MBlazeFunctionInfo *MBlazeFI = MF.getInfo<MBlazeFunctionInfo>();
|
||||||
llvm::CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
CallingConv::ID CallConv = MF.getFunction()->getCallingConv();
|
||||||
bool requiresRA = CallConv == llvm::CallingConv::MBLAZE_INTR;
|
bool requiresRA = CallConv == CallingConv::MBLAZE_INTR;
|
||||||
|
|
||||||
if (MFI->adjustsStack() || requiresRA) {
|
if (MFI->adjustsStack() || requiresRA) {
|
||||||
MBlazeFI->setRAStackOffset(0);
|
MBlazeFI->setRAStackOffset(0);
|
||||||
|
@ -1046,10 +1046,10 @@ LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
|
|||||||
|
|
||||||
// If this function is using the interrupt_handler calling convention
|
// If this function is using the interrupt_handler calling convention
|
||||||
// then use "rtid r14, 0" otherwise use "rtsd r15, 8"
|
// then use "rtid r14, 0" otherwise use "rtsd r15, 8"
|
||||||
unsigned Ret = (CallConv == llvm::CallingConv::MBLAZE_INTR) ? MBlazeISD::IRet
|
unsigned Ret = (CallConv == CallingConv::MBLAZE_INTR) ? MBlazeISD::IRet
|
||||||
: MBlazeISD::Ret;
|
: MBlazeISD::Ret;
|
||||||
unsigned Reg = (CallConv == llvm::CallingConv::MBLAZE_INTR) ? MBlaze::R14
|
unsigned Reg = (CallConv == CallingConv::MBLAZE_INTR) ? MBlaze::R14
|
||||||
: MBlaze::R15;
|
: MBlaze::R15;
|
||||||
SDValue DReg = DAG.getRegister(Reg, MVT::i32);
|
SDValue DReg = DAG.getRegister(Reg, MVT::i32);
|
||||||
|
|
||||||
if (Flag.getNode())
|
if (Flag.getNode())
|
||||||
|
@ -5737,7 +5737,7 @@ bool PPCTargetLowering::isLegalAddressImmediate(int64_t V,Type *Ty) const{
|
|||||||
return (V > -(1 << 16) && V < (1 << 16)-1);
|
return (V > -(1 << 16) && V < (1 << 16)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PPCTargetLowering::isLegalAddressImmediate(llvm::GlobalValue* GV) const {
|
bool PPCTargetLowering::isLegalAddressImmediate(GlobalValue* GV) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ unsigned TargetData::getAlignmentInfo(AlignTypeEnum AlignType,
|
|||||||
// If the alignment is not a power of 2, round up to the next power of 2.
|
// If the alignment is not a power of 2, round up to the next power of 2.
|
||||||
// This happens for non-power-of-2 length vectors.
|
// This happens for non-power-of-2 length vectors.
|
||||||
if (Align & (Align-1))
|
if (Align & (Align-1))
|
||||||
Align = llvm::NextPowerOf2(Align);
|
Align = NextPowerOf2(Align);
|
||||||
return Align;
|
return Align;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2179,7 +2179,7 @@ bool X86FastISel::TryToFoldLoad(MachineInstr *MI, unsigned OpNo,
|
|||||||
|
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
llvm::FastISel *X86::createFastISel(FunctionLoweringInfo &funcInfo) {
|
FastISel *X86::createFastISel(FunctionLoweringInfo &funcInfo) {
|
||||||
return new X86FastISel(funcInfo);
|
return new X86FastISel(funcInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ namespace {
|
|||||||
/// getSTReg - Return the X86::ST(i) register which contains the specified
|
/// getSTReg - Return the X86::ST(i) register which contains the specified
|
||||||
/// FP<RegNo> register.
|
/// FP<RegNo> register.
|
||||||
unsigned getSTReg(unsigned RegNo) const {
|
unsigned getSTReg(unsigned RegNo) const {
|
||||||
return StackTop - 1 - getSlot(RegNo) + llvm::X86::ST0;
|
return StackTop - 1 - getSlot(RegNo) + X86::ST0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushReg - Push the specified FP<n> register onto the stack.
|
// pushReg - Push the specified FP<n> register onto the stack.
|
||||||
|
@ -2465,6 +2465,6 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
|
|||||||
/// X86-specific DAG, ready for instruction scheduling.
|
/// X86-specific DAG, ready for instruction scheduling.
|
||||||
///
|
///
|
||||||
FunctionPass *llvm::createX86ISelDag(X86TargetMachine &TM,
|
FunctionPass *llvm::createX86ISelDag(X86TargetMachine &TM,
|
||||||
llvm::CodeGenOpt::Level OptLevel) {
|
CodeGenOpt::Level OptLevel) {
|
||||||
return new X86DAGToDAGISel(TM, OptLevel);
|
return new X86DAGToDAGISel(TM, OptLevel);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user