Loading llvm/include/llvm/CodeGen/MachineFunction.h +16 −3 Original line number Diff line number Diff line Loading @@ -787,9 +787,14 @@ public: /// /// This is allocated on the function's allocator and so lives the life of /// the function. MachineInstr::ExtraInfo *createMIExtraInfo( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol = nullptr, MCSymbol *PostInstrSymbol = nullptr, MDNode *HeapAllocMarker = nullptr); MachineInstr::ExtraInfo * createMIExtraInfo(ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol = nullptr, MCSymbol *PostInstrSymbol = nullptr); MachineInstr::ExtraInfo *createMIExtraInfoWithMarker( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol, MDNode *HeapAllocMarker); /// Allocate a string and populate it with the given external symbol name. const char *createExternalSymbolName(StringRef Name); Loading Loading @@ -933,6 +938,14 @@ public: return CodeViewAnnotations; } /// Record heapallocsites void addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD); ArrayRef<std::tuple<MCSymbol*, MCSymbol*, DIType*>> getCodeViewHeapAllocSites() const { return CodeViewHeapAllocSites; } /// Return a reference to the C++ typeinfo for the current function. const std::vector<const GlobalValue *> &getTypeInfos() const { return TypeInfos; Loading llvm/lib/CodeGen/MachineFunction.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,15 @@ MachineFunction::getMachineMemOperand(const MachineMemOperand *MMO, MMO->getOrdering(), MMO->getFailureOrdering()); } MachineInstr::ExtraInfo *MachineFunction::createMIExtraInfo( MachineInstr::ExtraInfo * MachineFunction::createMIExtraInfo(ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol) { return MachineInstr::ExtraInfo::create(Allocator, MMOs, PreInstrSymbol, PostInstrSymbol, nullptr); } MachineInstr::ExtraInfo *MachineFunction::createMIExtraInfoWithMarker( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol, MDNode *HeapAllocMarker) { return MachineInstr::ExtraInfo::create(Allocator, MMOs, PreInstrSymbol, Loading Loading @@ -822,6 +830,16 @@ try_next:; return FilterID; } void MachineFunction::addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD) { MCSymbol *BeginLabel = Ctx.createTempSymbol("heapallocsite", true); MCSymbol *EndLabel = Ctx.createTempSymbol("heapallocsite", true); I->setPreInstrSymbol(*this, BeginLabel); I->setPostInstrSymbol(*this, EndLabel); DIType *DI = dyn_cast<DIType>(MD); CodeViewHeapAllocSites.push_back(std::make_tuple(BeginLabel, EndLabel, DI)); } void MachineFunction::updateCallSiteInfo(const MachineInstr *Old, const MachineInstr *New) { if (!Target.Options.EnableDebugEntryValues || Old == New) Loading llvm/lib/CodeGen/MachineInstr.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ void MachineInstr::setExtraInfo(MachineFunction &MF, // 32-bit pointers. // FIXME: Maybe we should make the symbols in the extra info mutable? else if (NumPointers > 1 || HasHeapAllocMarker) { Info.set<EIIK_OutOfLine>(MF.createMIExtraInfo( Info.set<EIIK_OutOfLine>(MF.createMIExtraInfoWithMarker( MMOs, PreInstrSymbol, PostInstrSymbol, HeapAllocMarker)); return; } Loading Loading
llvm/include/llvm/CodeGen/MachineFunction.h +16 −3 Original line number Diff line number Diff line Loading @@ -787,9 +787,14 @@ public: /// /// This is allocated on the function's allocator and so lives the life of /// the function. MachineInstr::ExtraInfo *createMIExtraInfo( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol = nullptr, MCSymbol *PostInstrSymbol = nullptr, MDNode *HeapAllocMarker = nullptr); MachineInstr::ExtraInfo * createMIExtraInfo(ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol = nullptr, MCSymbol *PostInstrSymbol = nullptr); MachineInstr::ExtraInfo *createMIExtraInfoWithMarker( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol, MDNode *HeapAllocMarker); /// Allocate a string and populate it with the given external symbol name. const char *createExternalSymbolName(StringRef Name); Loading Loading @@ -933,6 +938,14 @@ public: return CodeViewAnnotations; } /// Record heapallocsites void addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD); ArrayRef<std::tuple<MCSymbol*, MCSymbol*, DIType*>> getCodeViewHeapAllocSites() const { return CodeViewHeapAllocSites; } /// Return a reference to the C++ typeinfo for the current function. const std::vector<const GlobalValue *> &getTypeInfos() const { return TypeInfos; Loading
llvm/lib/CodeGen/MachineFunction.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -446,7 +446,15 @@ MachineFunction::getMachineMemOperand(const MachineMemOperand *MMO, MMO->getOrdering(), MMO->getFailureOrdering()); } MachineInstr::ExtraInfo *MachineFunction::createMIExtraInfo( MachineInstr::ExtraInfo * MachineFunction::createMIExtraInfo(ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol) { return MachineInstr::ExtraInfo::create(Allocator, MMOs, PreInstrSymbol, PostInstrSymbol, nullptr); } MachineInstr::ExtraInfo *MachineFunction::createMIExtraInfoWithMarker( ArrayRef<MachineMemOperand *> MMOs, MCSymbol *PreInstrSymbol, MCSymbol *PostInstrSymbol, MDNode *HeapAllocMarker) { return MachineInstr::ExtraInfo::create(Allocator, MMOs, PreInstrSymbol, Loading Loading @@ -822,6 +830,16 @@ try_next:; return FilterID; } void MachineFunction::addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD) { MCSymbol *BeginLabel = Ctx.createTempSymbol("heapallocsite", true); MCSymbol *EndLabel = Ctx.createTempSymbol("heapallocsite", true); I->setPreInstrSymbol(*this, BeginLabel); I->setPostInstrSymbol(*this, EndLabel); DIType *DI = dyn_cast<DIType>(MD); CodeViewHeapAllocSites.push_back(std::make_tuple(BeginLabel, EndLabel, DI)); } void MachineFunction::updateCallSiteInfo(const MachineInstr *Old, const MachineInstr *New) { if (!Target.Options.EnableDebugEntryValues || Old == New) Loading
llvm/lib/CodeGen/MachineInstr.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ void MachineInstr::setExtraInfo(MachineFunction &MF, // 32-bit pointers. // FIXME: Maybe we should make the symbols in the extra info mutable? else if (NumPointers > 1 || HasHeapAllocMarker) { Info.set<EIIK_OutOfLine>(MF.createMIExtraInfo( Info.set<EIIK_OutOfLine>(MF.createMIExtraInfoWithMarker( MMOs, PreInstrSymbol, PostInstrSymbol, HeapAllocMarker)); return; } Loading