diff options
author | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2023-04-18 14:09:12 -0700 |
---|---|---|
committer | Shubham Sandeep Rastogi <srastogi22@apple.com> | 2023-04-24 16:10:54 -0700 |
commit | a971bc38cee892fb490b806eec74f2188fb70416 (patch) | |
tree | 37d302707b55e53ba157ee0b98e68252153ea42e /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 9bd0db80784e30d40a4a65f1b47109c833f05b54 (diff) | |
download | llvm-a971bc38cee892fb490b806eec74f2188fb70416.zip llvm-a971bc38cee892fb490b806eec74f2188fb70416.tar.gz llvm-a971bc38cee892fb490b806eec74f2188fb70416.tar.bz2 |
Move DBG_VALUE's that depend on loads to after a
load if the load is moved due to the pre register allocation ld/st
optimization pass
The issue here is that there can be a scenario where debug information
is lost because of the pre register allocation load store optimization
pass, where a load who's result describes the debug infomation for a
local variable gets moved below the load and that causes the debug
information for that load to get lost.
Example:
Before the Pre Register Allocation Load Store Pass
inst_a
%2 = ld ...
inst_b
DBG_VALUE %2, "x", ...
%3 = ld ...
After the Pass:
inst_a
inst_b
DBG_VALUE %2, "x", ...
%2 = ld ...
%3 = ld ...
The load has now been moved to after the DBG_VAL that uses its result
and the debug info for "x" has been lost. What we want is:
inst_a
inst_b
%2 = ld ...
DBG_VALUE %2, "x", ...
%3 = ld ...
Which is what this patch addresses
Differential Revision: https://reviews.llvm.org/D145168
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions