diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2022-05-03 09:42:27 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2022-05-03 09:56:12 +0100 |
commit | 1d712c381819498940ee592b670a81eb0f762f7d (patch) | |
tree | 796be1255b3080086e2f5c9ba6ce9d676d71adbc /llvm/lib/Support/CommandLine.cpp | |
parent | dd8cf372c54fdb654d1a7e7578460eb95e6531f9 (diff) | |
download | llvm-1d712c381819498940ee592b670a81eb0f762f7d.zip llvm-1d712c381819498940ee592b670a81eb0f762f7d.tar.gz llvm-1d712c381819498940ee592b670a81eb0f762f7d.tar.bz2 |
[DebugInfo][InstrRef] Don't generate redundant DBG_PHIs
In SelectionDAG, DBG_PHI instructions are created to "read" physreg values
and give them an instruction number, when they can't be traced back to a
defining instruction. The most common scenario if arguments to a function.
Unfortunately, if you have 100 inlined methods, each of which has the same
"this" pointer, then the 100 dbg.value instructions become 100
DBG_INSTR_REFs plus 100 DBG_PHIs, where only one DBG_PHI would suffice.
This patch adds a vreg cache for MachienFunction::salvageCopySSA, if we've
already traced a value back to the start of a block and created a DBG_PHI
then it allows us to re-use the DBG_PHI, as well as reducing work.
Differential Revision: https://reviews.llvm.org/D124517
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions