diff options
author | Jeremy Morse <jeremy.morse.llvm@gmail.com> | 2019-08-19 09:53:07 +0000 |
---|---|---|
committer | Jeremy Morse <jeremy.morse.llvm@gmail.com> | 2019-08-19 09:53:07 +0000 |
commit | 176bbd5cde362ad965dcda5cc72b655117685a5a (patch) | |
tree | 5240dd93e0201d521712863fa8221ef9dc05cd05 /lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py | |
parent | 2cafd872fb97f2899ac0f1b01ed82ee88581c86d (diff) | |
download | bcm5719-llvm-176bbd5cde362ad965dcda5cc72b655117685a5a.tar.gz bcm5719-llvm-176bbd5cde362ad965dcda5cc72b655117685a5a.zip |
[DebugInfo] Make postra sinking of DBG_VALUEs subregister-safe
Currently the machine instruction sinker identifies DBG_VALUE insts that
also need to sink by comparing register numbers. Unfortunately this isn't
safe, because (after register allocation) a DBG_VALUE may read a register
that aliases what's being sunk. To fix this, identify the DBG_VALUEs that
need to sink by recording & examining their register units. Register units
gives us the following guarantee:
"Two registers overlap if and only if they have a common register unit"
[MCRegisterInfo.h]
Thus we can always identify aliasing DBG_VALUEs if the set of register
units read by the DBG_VALUE, and the register units of the instruction
being sunk, intersect. (MachineSink already uses classes like
"LiveRegUnits" for determining sinking validity anyway).
The test added checks for super and subregister DBG_VALUE reads of a sunk
copy being sunk as well.
Differential Revision: https://reviews.llvm.org/D58191
llvm-svn: 369247
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py')
0 files changed, 0 insertions, 0 deletions