[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h LiveVariables.h
Evan Cheng
evan.cheng at apple.com
Wed Apr 25 00:30:41 PDT 2007
Changes in directory llvm/include/llvm/CodeGen:
LiveIntervalAnalysis.h updated: 1.79 -> 1.80
LiveVariables.h updated: 1.38 -> 1.39
---
Log message:
Fix for PR1306: http://llvm.org/PR1306 .
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.
---
Diffs of the changes: (+20 -3)
LiveIntervalAnalysis.h | 2 +-
LiveVariables.h | 21 +++++++++++++++++++--
2 files changed, 20 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.79 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.80
--- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.79 Tue Apr 17 21:30:19 2007
+++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h Wed Apr 25 02:30:23 2007
@@ -255,7 +255,7 @@
/// handleLiveInRegister - Create interval for a livein register.
void handleLiveInRegister(MachineBasicBlock* mbb,
unsigned MIIdx,
- LiveInterval &interval);
+ LiveInterval &interval, bool isAlias = false);
/// Return true if the two specified registers belong to different
/// register classes. The registers may be either phys or virt regs.
Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.38 llvm/include/llvm/CodeGen/LiveVariables.h:1.39
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.38 Wed Apr 18 00:04:38 2007
+++ llvm/include/llvm/CodeGen/LiveVariables.h Wed Apr 25 02:30:23 2007
@@ -124,8 +124,25 @@
const MRegisterInfo *RegInfo;
- MachineInstr **PhysRegInfo;
- bool *PhysRegUsed;
+ // PhysRegInfo - Keep track of which instruction was the last def/use of a
+ // physical register. This is a purely local property, because all physical
+ // register references as presumed dead across basic blocks.
+ std::vector<MachineInstr*> PhysRegInfo;
+
+ // PhysRegUsed - Keep track whether the physical register has been used after
+ // its last definition. This is local property.
+ BitVector PhysRegUsed;
+
+ // PhysRegPartDef - Keep track of a list of instructions which "partially"
+ // defined the physical register (e.g. on X86 AX partially defines EAX).
+ // These are turned into use/mod/write if there is a use of the register
+ // later in the same block. This is local property.
+ std::vector<std::vector<MachineInstr*> > PhysRegPartDef;
+
+ // PhysRegPartUse - Keep track of which instruction was the last partial use
+ // of a physical register (e.g. on X86 a def of EAX followed by a use of AX).
+ // This is a purely local property.
+ std::vector<MachineInstr*> PhysRegPartUse;
typedef std::map<const MachineBasicBlock*,
std::vector<unsigned> > PHIVarInfoMap;
More information about the llvm-commits
mailing list