Fix a couple of formatting and style issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-07-18 20:35:49 +00:00
parent 7b1a0fd7ab
commit 68a7bfa90b

View File

@@ -94,10 +94,10 @@ bool MipsInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
return (BT == BT_None) || (BT == BT_Indirect); return (BT == BT_None) || (BT == BT_Indirect);
} }
void MipsInstrInfo::BuildCondBr(MachineBasicBlock &MBB, void
MachineBasicBlock *TBB, DebugLoc DL, MipsInstrInfo::BuildCondBr(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
const SmallVectorImpl<MachineOperand>& Cond) DebugLoc DL,
const { const SmallVectorImpl<MachineOperand> &Cond) const {
unsigned Opc = Cond[0].getImm(); unsigned Opc = Cond[0].getImm();
const MCInstrDesc &MCID = get(Opc); const MCInstrDesc &MCID = get(Opc);
MachineInstrBuilder MIB = BuildMI(&MBB, DL, MCID); MachineInstrBuilder MIB = BuildMI(&MBB, DL, MCID);
@@ -113,11 +113,9 @@ void MipsInstrInfo::BuildCondBr(MachineBasicBlock &MBB,
MIB.addMBB(TBB); MIB.addMBB(TBB);
} }
unsigned MipsInstrInfo:: unsigned MipsInstrInfo::InsertBranch(
InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB,
MachineBasicBlock *FBB, const SmallVectorImpl<MachineOperand> &Cond, DebugLoc DL) const {
const SmallVectorImpl<MachineOperand> &Cond,
DebugLoc DL) const {
// Shouldn't be a fall through. // Shouldn't be a fall through.
assert(TBB && "InsertBranch must not be told to insert a fallthrough"); assert(TBB && "InsertBranch must not be told to insert a fallthrough");
@@ -145,9 +143,7 @@ InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
return 1; return 1;
} }
unsigned MipsInstrInfo:: unsigned MipsInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const {
RemoveBranch(MachineBasicBlock &MBB) const
{
MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend();
MachineBasicBlock::reverse_iterator FirstBr; MachineBasicBlock::reverse_iterator FirstBr;
unsigned removed; unsigned removed;
@@ -171,20 +167,18 @@ RemoveBranch(MachineBasicBlock &MBB) const
/// ReverseBranchCondition - Return the inverse opcode of the /// ReverseBranchCondition - Return the inverse opcode of the
/// specified Branch instruction. /// specified Branch instruction.
bool MipsInstrInfo:: bool MipsInstrInfo::ReverseBranchCondition(
ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const SmallVectorImpl<MachineOperand> &Cond) const {
{
assert( (Cond.size() && Cond.size() <= 3) && assert( (Cond.size() && Cond.size() <= 3) &&
"Invalid Mips branch condition!"); "Invalid Mips branch condition!");
Cond[0].setImm(getOppositeBranchOpc(Cond[0].getImm())); Cond[0].setImm(getOppositeBranchOpc(Cond[0].getImm()));
return false; return false;
} }
MipsInstrInfo::BranchType MipsInstrInfo:: MipsInstrInfo::BranchType MipsInstrInfo::AnalyzeBranch(
AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB,
MachineBasicBlock *&FBB, SmallVectorImpl<MachineOperand> &Cond, SmallVectorImpl<MachineOperand> &Cond, bool AllowModify,
bool AllowModify, SmallVectorImpl<MachineInstr *> &BranchInstrs) const {
SmallVectorImpl<MachineInstr*> &BranchInstrs) const {
MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend();