diff options
| author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-06-27 10:51:15 +0000 |
|---|---|---|
| committer | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-06-27 10:51:15 +0000 |
| commit | 7eeeb5947ec0920460b2e32025c4cc8ccffc7719 (patch) | |
| tree | e181bbae437372476935de2e2d45dea831c87e1c /llvm/lib/CodeGen | |
| parent | d528bcd9657312f6317d304fa486f42b034b735c (diff) | |
| download | bcm5719-llvm-7eeeb5947ec0920460b2e32025c4cc8ccffc7719.tar.gz bcm5719-llvm-7eeeb5947ec0920460b2e32025c4cc8ccffc7719.zip | |
[ISEL][X86] Tracking of registers that forward call arguments
While lowering calls, collect info about registers that forward arguments
into following function frame. We store such info into the MachineFunction
of the call. This is used very late when dumping DWARF info about
call site parameters.
([9/13] Introduce the debug entry values.)
Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>
Differential Revision: https://reviews.llvm.org/D60715
llvm-svn: 364516
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index 10f8f5032ae..568c6191e51 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -853,14 +853,20 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) { if (Before == After) return nullptr; + MachineInstr *MI; if (Before == BB->end()) { // There were no prior instructions; the new ones must start at the // beginning of the block. - return &Emitter.getBlock()->instr_front(); + MI = &Emitter.getBlock()->instr_front(); } else { // Return first instruction after the pre-existing instructions. - return &*std::next(Before); + MI = &*std::next(Before); } + + if (MI->isCall() && DAG->getTarget().Options.EnableDebugEntryValues) + MF.addCallArgsForwardingRegs(MI, DAG->getSDCallSiteInfo(Node)); + + return MI; }; // If this is the first BB, emit byval parameter dbg_value's. |

