diff options
author | Amy Huang <akhuang@google.com> | 2019-11-13 13:52:32 -0800 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2019-11-13 14:14:23 -0800 |
commit | 840845a1eeae2dc039600ef826de21347edd53ef (patch) | |
tree | e7e8f7da69e959ab19c83a8d6feaabe154dcc5d8 | |
parent | b288f7d6bb8fdd21d27ba755302db194c181fdaf (diff) | |
download | llvm-840845a1eeae2dc039600ef826de21347edd53ef.zip llvm-840845a1eeae2dc039600ef826de21347edd53ef.tar.gz llvm-840845a1eeae2dc039600ef826de21347edd53ef.tar.bz2 |
Fix merge issues in b288f7d6bb8fdd21d27ba755302db194c181fdaf
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 9 | ||||
-rw-r--r-- | llvm/unittests/CodeGen/MachineInstrTest.cpp | 16 |
2 files changed, 11 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 5470422..e6133ba 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -822,12 +822,9 @@ try_next:; return FilterID; } -void MachineFunction::moveCallSiteInfo(const MachineInstr *Old, - const MachineInstr *New) { - assert(New->isCall() && "Call site info refers only to call instructions!"); - - CallSiteInfoMap::iterator CSIt = getCallSiteInfo(Old); - if (CSIt == CallSitesInfo.end()) +void MachineFunction::updateCallSiteInfo(const MachineInstr *Old, + const MachineInstr *New) { + if (!Target.Options.EnableDebugEntryValues || Old == New) return; assert(Old->isCall() && (!New || New->isCall()) && diff --git a/llvm/unittests/CodeGen/MachineInstrTest.cpp b/llvm/unittests/CodeGen/MachineInstrTest.cpp index 977495e..f09ea7b 100644 --- a/llvm/unittests/CodeGen/MachineInstrTest.cpp +++ b/llvm/unittests/CodeGen/MachineInstrTest.cpp @@ -139,11 +139,8 @@ private: BogusSubtarget ST; }; -static MCAsmInfo AsmInfo = MCAsmInfo(); - -std::unique_ptr<MCContext> createMCContext() { - return std::make_unique<MCContext>( - &AsmInfo, nullptr, nullptr, nullptr, nullptr, false); +std::unique_ptr<MCContext> createMCContext(MCAsmInfo *AsmInfo) { + return std::make_unique<MCContext>(AsmInfo, nullptr, nullptr, nullptr, false); } std::unique_ptr<BogusTargetMachine> createTargetMachine() { @@ -378,7 +375,8 @@ TEST(MachineInstrExtraInfo, AddExtraInfo) { 0, nullptr, nullptr, nullptr, 0, nullptr}; auto MI = MF->CreateMachineInstr(MCID, DebugLoc()); - auto MC = createMCContext(); + auto MAI = MCAsmInfo(); + auto MC = createMCContext(&MAI); auto MMO = MF->getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad, 8, 8); SmallVector<MachineMemOperand *, 2> MMOs; @@ -424,7 +422,8 @@ TEST(MachineInstrExtraInfo, ChangeExtraInfo) { 0, nullptr, nullptr, nullptr, 0, nullptr}; auto MI = MF->CreateMachineInstr(MCID, DebugLoc()); - auto MC = createMCContext(); + auto MAI = MCAsmInfo(); + auto MC = createMCContext(&MAI); auto MMO = MF->getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad, 8, 8); SmallVector<MachineMemOperand *, 2> MMOs; @@ -460,7 +459,8 @@ TEST(MachineInstrExtraInfo, RemoveExtraInfo) { 0, nullptr, nullptr, nullptr, 0, nullptr}; auto MI = MF->CreateMachineInstr(MCID, DebugLoc()); - auto MC = createMCContext(); + auto MAI = MCAsmInfo(); + auto MC = createMCContext(&MAI); auto MMO = MF->getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad, 8, 8); SmallVector<MachineMemOperand *, 2> MMOs; |