diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 07:30:23 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 07:30:23 +0000 |
commit | 24a3cc4c83e5edb25fadf7b8979a26b4451795c6 (patch) | |
tree | a5044708e5d0a85f2a1823700797ac7ad7d99fea /include/llvm/CodeGen/LiveVariables.h | |
parent | b2f2e64c0790db11aea7eb52e2d056527204ee9a (diff) |
Fix for 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index d87d64bb82..da267c5ddd 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -124,8 +124,25 @@ private: // Intermediate data structures 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; |