[llvm-branch-commits] [llvm] 840845a - Fix merge issues in b288f7d6bb8fdd21d27ba755302db194c181fdaf
Amy Huang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 13 14:16:59 PST 2019
Author: Amy Huang
Date: 2019-11-13T14:14:23-08:00
New Revision: 840845a1eeae2dc039600ef826de21347edd53ef
URL: https://github.com/llvm/llvm-project/commit/840845a1eeae2dc039600ef826de21347edd53ef
DIFF: https://github.com/llvm/llvm-project/commit/840845a1eeae2dc039600ef826de21347edd53ef.diff
LOG: Fix merge issues in b288f7d6bb8fdd21d27ba755302db194c181fdaf
Added:
Modified:
llvm/lib/CodeGen/MachineFunction.cpp
llvm/unittests/CodeGen/MachineInstrTest.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 5470422be4d3..e6133bab468c 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 977495e0086d..f09ea7baad16 100644
--- a/llvm/unittests/CodeGen/MachineInstrTest.cpp
+++ b/llvm/unittests/CodeGen/MachineInstrTest.cpp
@@ -139,11 +139,8 @@ class BogusTargetMachine : public LLVMTargetMachine {
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;
More information about the llvm-branch-commits
mailing list