mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
[mips] Coding style clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c746503425
commit
116189a997
@ -562,16 +562,15 @@ bool Filler::searchBackward(MachineBasicBlock &MBB, Iter Slot) const {
|
||||
|
||||
RegDU.init(*Slot);
|
||||
|
||||
if (searchRange(MBB, ReverseIter(Slot), MBB.rend(), RegDU, MemDU, Filler)) {
|
||||
if (!searchRange(MBB, ReverseIter(Slot), MBB.rend(), RegDU, MemDU, Filler))
|
||||
return false;
|
||||
|
||||
MBB.splice(llvm::next(Slot), &MBB, llvm::next(Filler).base());
|
||||
MIBundleBuilder(MBB, Slot, llvm::next(llvm::next(Slot)));
|
||||
++UsefulSlots;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Filler::searchForward(MachineBasicBlock &MBB, Iter Slot) const {
|
||||
// Can handle only calls.
|
||||
if (DisableForwardSearch || !Slot->isCall())
|
||||
@ -583,16 +582,15 @@ bool Filler::searchForward(MachineBasicBlock &MBB, Iter Slot) const {
|
||||
|
||||
RegDU.setCallerSaved(*Slot);
|
||||
|
||||
if (searchRange(MBB, llvm::next(Slot), MBB.end(), RegDU, NM, Filler)) {
|
||||
if (!searchRange(MBB, llvm::next(Slot), MBB.end(), RegDU, NM, Filler))
|
||||
return false;
|
||||
|
||||
MBB.splice(llvm::next(Slot), &MBB, Filler);
|
||||
MIBundleBuilder(MBB, Slot, llvm::next(llvm::next(Slot)));
|
||||
++UsefulSlots;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Filler::searchSuccBBs(MachineBasicBlock &MBB, Iter Slot) const {
|
||||
if (DisableSuccBBSearch)
|
||||
return false;
|
||||
|
@ -915,8 +915,7 @@ MipsTargetLowering::emitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
|
||||
|
||||
// Transfer the remainder of BB and its successor edges to exitMBB.
|
||||
exitMBB->splice(exitMBB->begin(), BB,
|
||||
llvm::next(MachineBasicBlock::iterator(MI)),
|
||||
BB->end());
|
||||
llvm::next(MachineBasicBlock::iterator(MI)), BB->end());
|
||||
exitMBB->transferSuccessorsAndUpdatePHIs(BB);
|
||||
|
||||
// thisMBB:
|
||||
@ -1111,8 +1110,7 @@ MipsTargetLowering::emitAtomicBinaryPartword(MachineInstr *MI,
|
||||
return exitMBB;
|
||||
}
|
||||
|
||||
MachineBasicBlock *
|
||||
MipsTargetLowering::emitAtomicCmpSwap(MachineInstr *MI,
|
||||
MachineBasicBlock * MipsTargetLowering::emitAtomicCmpSwap(MachineInstr *MI,
|
||||
MachineBasicBlock *BB,
|
||||
unsigned Size) const {
|
||||
assert((Size == 4 || Size == 8) && "Unsupported size for EmitAtomicCmpSwap.");
|
||||
@ -1130,8 +1128,7 @@ MipsTargetLowering::emitAtomicCmpSwap(MachineInstr *MI,
|
||||
ZERO = Mips::ZERO;
|
||||
BNE = Mips::BNE;
|
||||
BEQ = Mips::BEQ;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LL = Mips::LLD;
|
||||
SC = Mips::SCD;
|
||||
ZERO = Mips::ZERO_64;
|
||||
@ -1374,9 +1371,7 @@ SDValue MipsTargetLowering::lowerBR_JT(SDValue Op, SelectionDAG &DAG) const {
|
||||
return DAG.getNode(ISD::BRIND, DL, MVT::Other, Chain, Addr);
|
||||
}
|
||||
|
||||
SDValue MipsTargetLowering::
|
||||
lowerBRCOND(SDValue Op, SelectionDAG &DAG) const
|
||||
{
|
||||
SDValue MipsTargetLowering::lowerBRCOND(SDValue Op, SelectionDAG &DAG) const {
|
||||
// The first operand is the chain, the second is the condition, the third is
|
||||
// the block to branch to if the condition is true.
|
||||
SDValue Chain = Op.getOperand(0);
|
||||
@ -2117,19 +2112,14 @@ SDValue MipsTargetLowering::lowerFP_TO_SINT(SDValue Op,
|
||||
// For vararg functions, all arguments are passed in A0, A1, A2, A3 and stack.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static bool CC_MipsO32(unsigned ValNo, MVT ValVT,
|
||||
MVT LocVT, CCValAssign::LocInfo LocInfo,
|
||||
ISD::ArgFlagsTy ArgFlags, CCState &State,
|
||||
const uint16_t *F64Regs) {
|
||||
static bool CC_MipsO32(unsigned ValNo, MVT ValVT, MVT LocVT,
|
||||
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
||||
CCState &State, const uint16_t *F64Regs) {
|
||||
|
||||
static const unsigned IntRegsSize = 4, FloatRegsSize = 2;
|
||||
|
||||
static const uint16_t IntRegs[] = {
|
||||
Mips::A0, Mips::A1, Mips::A2, Mips::A3
|
||||
};
|
||||
static const uint16_t F32Regs[] = {
|
||||
Mips::F12, Mips::F14
|
||||
};
|
||||
static const uint16_t IntRegs[] = { Mips::A0, Mips::A1, Mips::A2, Mips::A3 };
|
||||
static const uint16_t F32Regs[] = { Mips::F12, Mips::F14 };
|
||||
|
||||
// Do not process byval args here.
|
||||
if (ArgFlags.isByVal())
|
||||
@ -3092,8 +3082,8 @@ void MipsTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
||||
TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG);
|
||||
}
|
||||
|
||||
bool
|
||||
MipsTargetLowering::isLegalAddressingMode(const AddrMode &AM, Type *Ty) const {
|
||||
bool MipsTargetLowering::isLegalAddressingMode(const AddrMode &AM,
|
||||
Type *Ty) const {
|
||||
// No global is ever allowed as a base.
|
||||
if (AM.BaseGV)
|
||||
return false;
|
||||
@ -3317,8 +3307,7 @@ analyzeReturn(const SmallVectorImpl<ISD::OutputArg> &Outs, bool IsSoftFloat,
|
||||
analyzeReturn(Outs, IsSoftFloat, 0, RetTy);
|
||||
}
|
||||
|
||||
void
|
||||
MipsTargetLowering::MipsCC::handleByValArg(unsigned ValNo, MVT ValVT,
|
||||
void MipsTargetLowering::MipsCC::handleByValArg(unsigned ValNo, MVT ValVT,
|
||||
MVT LocVT,
|
||||
CCValAssign::LocInfo LocInfo,
|
||||
ISD::ArgFlagsTy ArgFlags) {
|
||||
@ -3541,15 +3530,13 @@ passByValArg(SDValue Chain, SDLoc DL,
|
||||
DAG.getConstant(Offset, PtrTy));
|
||||
SDValue Dst = DAG.getNode(ISD::ADD, DL, PtrTy, StackPtr,
|
||||
DAG.getIntPtrConstant(ByVal.Address));
|
||||
Chain = DAG.getMemcpy(Chain, DL, Dst, Src,
|
||||
DAG.getConstant(MemCpySize, PtrTy), Alignment,
|
||||
/*isVolatile=*/false, /*AlwaysInline=*/false,
|
||||
Chain = DAG.getMemcpy(Chain, DL, Dst, Src, DAG.getConstant(MemCpySize, PtrTy),
|
||||
Alignment, /*isVolatile=*/false, /*AlwaysInline=*/false,
|
||||
MachinePointerInfo(0), MachinePointerInfo(0));
|
||||
MemOpChains.push_back(Chain);
|
||||
}
|
||||
|
||||
void
|
||||
MipsTargetLowering::writeVarArgRegs(std::vector<SDValue> &OutChains,
|
||||
void MipsTargetLowering::writeVarArgRegs(std::vector<SDValue> &OutChains,
|
||||
const MipsCC &CC, SDValue Chain,
|
||||
SDLoc DL, SelectionDAG &DAG) const {
|
||||
unsigned NumRegs = CC.numIntArgRegs();
|
||||
@ -3569,8 +3556,7 @@ MipsTargetLowering::writeVarArgRegs(std::vector<SDValue> &OutChains,
|
||||
if (NumRegs == Idx)
|
||||
VaArgOffset = RoundUpToAlignment(CCInfo.getNextStackOffset(), RegSize);
|
||||
else
|
||||
VaArgOffset =
|
||||
(int)CC.reservedArgArea() - (int)(RegSize * (NumRegs - Idx));
|
||||
VaArgOffset = (int)CC.reservedArgArea() - (int)(RegSize * (NumRegs - Idx));
|
||||
|
||||
// Record the frame index of the first variable argument
|
||||
// which is a value necessary to VASTART.
|
||||
|
Loading…
Reference in New Issue
Block a user