diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 1e48ba9..2321a27 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -301,13 +301,12 @@ void MachineInstr::setExtraInfo(MachineFunction &MF, ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol, - MDNode *HeapAllocMarker, uint32_t CFIType) { + MDNode *HeapAllocMarker) { bool HasPreInstrSymbol = PreInstrSymbol != nullptr; bool HasPostInstrSymbol = PostInstrSymbol != nullptr; bool HasHeapAllocMarker = HeapAllocMarker != nullptr; - bool HasCFIType = CFIType != 0; - int NumPointers = MMOs.size() + HasPreInstrSymbol + HasPostInstrSymbol + - HasHeapAllocMarker + HasCFIType; + int NumPointers = + MMOs.size() + HasPreInstrSymbol + HasPostInstrSymbol + HasHeapAllocMarker; // Drop all extra info if there is none. if (NumPointers <= 0) { @@ -321,7 +320,7 @@ void MachineInstr::setExtraInfo(MachineFunction &MF, // FIXME: Maybe we should make the symbols in the extra info mutable? else if (NumPointers > 1 || HasHeapAllocMarker) { Info.set<EIIK_OutOfLine>(MF.createMIExtraInfo( - MMOs, PreInstrSymbol, PostInstrSymbol, HeapAllocMarker, CFIType)); + MMOs, PreInstrSymbol, PostInstrSymbol, HeapAllocMarker)); return; } @@ -330,8 +329,6 @@ void MachineInstr::setExtraInfo(MachineFunction &MF, Info.set<EIIK_PreInstrSymbol>(PreInstrSymbol); else if (HasPostInstrSymbol) Info.set<EIIK_PostInstrSymbol>(PostInstrSymbol); - else if (HasCFIType) - Info.set<EIIK_CFIType>(CFIType); else Info.set<EIIK_MMO>(MMOs[0]); } @@ -341,7 +338,7 @@ void MachineInstr::dropMemRefs(MachineFunction &MF) { return; setExtraInfo(MF, {}, getPreInstrSymbol(), getPostInstrSymbol(), - getHeapAllocMarker(), getCFIType()); + getHeapAllocMarker()); } void MachineInstr::setMemRefs(MachineFunction &MF, @@ -352,7 +349,7 @@ void MachineInstr::setMemRefs(MachineFunction &MF, } setExtraInfo(MF, MMOs, getPreInstrSymbol(), getPostInstrSymbol(), - getHeapAllocMarker(), getCFIType()); + getHeapAllocMarker()); } void MachineInstr::addMemOperand(MachineFunction &MF, @@ -460,7 +457,7 @@ void MachineInstr::setPreInstrSymbol(MachineFunction &MF, MCSymbol *Symbol) { } setExtraInfo(MF, memoperands(), Symbol, getPostInstrSymbol(), - getHeapAllocMarker(), getCFIType()); + getHeapAllocMarker()); } void MachineInstr::setPostInstrSymbol(MachineFunction &MF, MCSymbol *Symbol) { @@ -475,7 +472,7 @@ void MachineInstr::setPostInstrSymbol(MachineFunction &MF, MCSymbol *Symbol) { } setExtraInfo(MF, memoperands(), getPreInstrSymbol(), Symbol, - getHeapAllocMarker(), getCFIType()); + getHeapAllocMarker()); } void MachineInstr::setHeapAllocMarker(MachineFunction &MF, MDNode *Marker) { @@ -484,16 +481,7 @@ void MachineInstr::setHeapAllocMarker(MachineFunction &MF, MDNode *Marker) { return; setExtraInfo(MF, memoperands(), getPreInstrSymbol(), getPostInstrSymbol(), - Marker, getCFIType()); -} - -void MachineInstr::setCFIType(MachineFunction &MF, uint32_t Type) { - // Do nothing if old and new types are the same. - if (Type == getCFIType()) - return; - - setExtraInfo(MF, memoperands(), getPreInstrSymbol(), getPostInstrSymbol(), - getHeapAllocMarker(), Type); + Marker); } void MachineInstr::cloneInstrSymbols(MachineFunction &MF, @@ -647,10 +635,6 @@ bool MachineInstr::isIdenticalTo(const MachineInstr &Other, if (getPreInstrSymbol() != Other.getPreInstrSymbol() || getPostInstrSymbol() != Other.getPostInstrSymbol()) return false; - // Call instructions with different CFI types are not identical. - if (isCall() && getCFIType() != Other.getCFIType()) - return false; - return true; } @@ -1769,11 +1753,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << " heap-alloc-marker "; HeapAllocMarker->printAsOperand(OS, MST); } - if (uint32_t CFIType = getCFIType()) { - if (!FirstOp) - OS << ','; - OS << " cfi-type " << CFIType; - } if (DebugInstrNum) { if (!FirstOp) |