summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugVariables.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-06 18:00:02 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-06 18:00:02 +0000
commitf8da0288957addbfca73314d3ec0372849e46427 (patch)
tree185250ee719f296c8526d7ea04af75a17bc58e05 /llvm/lib/CodeGen/LiveDebugVariables.h
parentc86fe05923a31e8bc3ed7836e14199a84d775657 (diff)
downloadbcm5719-llvm-f8da0288957addbfca73314d3ec0372849e46427.tar.gz
bcm5719-llvm-f8da0288957addbfca73314d3ec0372849e46427.zip
Update LiveDebugVariables after live range splitting.
After a virtual register is split, update any debug user variables that resided in the old register. This ensures that the LiveDebugVariables are still correct after register allocation. This may create DBG_VALUE instructions that place a user variable in a register in parts of the function and in a stack slot in other parts. DwarfDebug currently doesn't support that. llvm-svn: 130998
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.h')
-rw-r--r--llvm/lib/CodeGen/LiveDebugVariables.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.h b/llvm/lib/CodeGen/LiveDebugVariables.h
index a6e40a19845..3ce3c398bd4 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.h
+++ b/llvm/lib/CodeGen/LiveDebugVariables.h
@@ -21,10 +21,12 @@
#ifndef LLVM_CODEGEN_LIVEDEBUGVARIABLES_H
#define LLVM_CODEGEN_LIVEDEBUGVARIABLES_H
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
namespace llvm {
+class LiveInterval;
class VirtRegMap;
class LiveDebugVariables : public MachineFunctionPass {
@@ -42,6 +44,11 @@ public:
/// register.
void renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx);
+ /// splitRegister - Move any user variables in OldReg to the live ranges in
+ /// NewRegs where they are live. Mark the values as unavailable where no new
+ /// register is live.
+ void splitRegister(unsigned OldReg, ArrayRef<LiveInterval*> NewRegs);
+
/// emitDebugValues - Emit new DBG_VALUE instructions reflecting the changes
/// that happened during register allocation.
/// @param VRM Rename virtual registers according to map.
OpenPOWER on IntegriCloud