diff options
author | Amy Huang <akhuang@google.com> | 2019-10-16 16:50:18 -0700 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2019-10-25 09:21:10 -0700 |
commit | b85b4e5a6f8579c137fecb59a4d75d7bfb111f79 (patch) | |
tree | 58ddaa01b58d03dc9b4e6698af8d3433d262fbe1 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | abd89c243a42da490dfd32368e25c896a7111a40 (diff) | |
download | bcm5719-llvm-b85b4e5a6f8579c137fecb59a4d75d7bfb111f79.tar.gz bcm5719-llvm-b85b4e5a6f8579c137fecb59a4d75d7bfb111f79.zip |
Add an instruction marker field to the ExtraInfo in MachineInstrs.
Summary:
Add instruction marker to MachineInstr ExtraInfo. This does almost the
same thing as Pre/PostInstrSymbols, except that it doesn't create a label until
printing instructions. This allows for labels to be put around instructions that
are deleted/duplicated somewhere.
Also undo the workaround in r375137.
Reviewers: rnk
Subscribers: MatzeB, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69136
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 6d7260d7aee..c8304f875f7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1236,10 +1236,9 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) { updateValueMap(CLI.CS->getInstruction(), CLI.ResultReg, CLI.NumResultRegs); // Set labels for heapallocsite call. - if (CLI.CS && CLI.CS->getInstruction()->hasMetadata("heapallocsite")) { - const MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite"); - MF->addCodeViewHeapAllocSite(CLI.Call, MD); - } + if (CLI.CS) + if (MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite")) + CLI.Call->setHeapAllocMarker(*MF, MD); return true; } |