Commit Graph

4 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen afc2bc2c04 Emit DBG_VALUE instructions from LiveDebugVariables.
llvm-svn: 120842
2010-12-03 21:47:10 +00:00
Jakob Stoklund Olesen 9ec20111c3 Update LiveDebugVariables during coalescing.
llvm-svn: 120720
2010-12-02 18:15:44 +00:00
Jakob Stoklund Olesen 4be0bd79a4 Implement the first half of LiveDebugVariables.
Scan the MachineFunction for DBG_VALUE instructions, and replace them with a
data structure similar to LiveIntervals. The live range of a DBG_VALUE is
determined by propagating it down the dominator tree until a new DBG_VALUE is
found. When a DBG_VALUE lives in a register, its live range is confined to the
live range of the register's value.

LiveDebugVariables runs before coalescing, so DBG_VALUEs are not artificially
extended when registers are joined.

The missing half will recreate DBG_VALUE instructions from the intervals when
register allocation is complete.

The pass is disabled by default. It can be enabled with the temporary command
line option -live-debug-variables.

llvm-svn: 120636
2010-12-02 00:37:37 +00:00
Jakob Stoklund Olesen d4900a644c Stub out a new LiveDebugVariables pass.
This analysis is going to run immediately after LiveIntervals. It will stay
alive during register allocation and keep track of user variables mentioned in
DBG_VALUE instructions.

When the register allocator is moving values between registers and the stack, it
is very hard to keep track of DBG_VALUE instructions. We usually get it wrong.
This analysis maintains a data structure that makes it easy to update DBG_VALUE
instructions.

llvm-svn: 120385
2010-11-30 02:17:10 +00:00