diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 20:01:33 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-27 20:01:33 +0000 |
commit | fd8cc23220d25dfe6956470da8bd63d26649c428 (patch) | |
tree | 121ce8d85170b862228e2a15d45da0bc7ad8b68b /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 982224cfb8de39337e977219b3571c5a87aca4ce (diff) | |
download | bcm5719-llvm-fd8cc23220d25dfe6956470da8bd63d26649c428.tar.gz bcm5719-llvm-fd8cc23220d25dfe6956470da8bd63d26649c428.zip |
CodeGen: Change MachineInstr to use MachineInstr&, NFC
Change MachineInstr API to prefer MachineInstr& over MachineInstr*
whenever the parameter is expected to be non-null. Slowly inching
toward being able to fix PR26753.
llvm-svn: 262149
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 8babedbbb67..c580d0e2d1e 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -357,7 +357,7 @@ static unsigned ComputeCommonTailLength(MachineBasicBlock *MBB1, --I2; } // I1, I2==first (untested) non-DBGs preceding known match - if (!I1->isIdenticalTo(I2) || + if (!I1->isIdenticalTo(*I2) || // FIXME: This check is dubious. It's used to get around a problem where // people incorrectly expect inline asm directives to remain in the same // relative order. This is untenable because normal compiler @@ -777,7 +777,7 @@ removeMMOsFromMemoryOperations(MachineBasicBlock::iterator MBBIStartPos, assert(MBBICommon != MBBIECommon && "Reached BB end within common tail length!"); - assert(MBBICommon->isIdenticalTo(&*MBBI) && "Expected matching MIIs!"); + assert(MBBICommon->isIdenticalTo(*MBBI) && "Expected matching MIIs!"); if (MBBICommon->mayLoad() || MBBICommon->mayStore()) MBBICommon->setMemRefs(MBBICommon->mergeMemRefsWith(*MBBI)); @@ -1275,7 +1275,7 @@ ReoptimizeBlock: // DBG_VALUE at the beginning of MBB. while (PrevBBIter != PrevBB.begin() && MBBIter != MBB->end() && PrevBBIter->isDebugValue() && MBBIter->isDebugValue()) { - if (!MBBIter->isIdenticalTo(PrevBBIter)) + if (!MBBIter->isIdenticalTo(*PrevBBIter)) break; MachineInstr *DuplicateDbg = MBBIter; ++MBBIter; -- PrevBBIter; @@ -1762,7 +1762,7 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) { if (FIB == FIE) break; } - if (!TIB->isIdenticalTo(FIB, MachineInstr::CheckKillDead)) + if (!TIB->isIdenticalTo(*FIB, MachineInstr::CheckKillDead)) break; if (TII->isPredicated(*TIB)) |