llvm.org GIT mirror llvm / 8a88563
Add comments, add a vector to keep track of which registers are allocatable git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6014 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
1 changed file(s) with 19 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 //===-- llvm/CodeGen/LiveVariables.h - Live Variable Analysis ---*- C++ -*-===//
11 //
2 // This file implements the LiveVariable analysis pass. For each machine
3 // instruction in the function, this pass calculates the set of registers that
4 // are immediately dead after the instruction (i.e., the instruction calculates
5 // the value, but it is never used) and the set of registers that are used by
6 // the instruction, but are never used after the instruction (i.e., they are
7 // killed).
8 //
29 // This class computes live variables using are sparse implementation based on
310 // the machine code SSA form. This class computes live variable information for
4 // each virtual and physical register in a function. It uses the dominance
5 // properties of SSA form to efficiently compute live variables for virtual
6 // registers, and assumes that physical registers are only live within a single
7 // basic block (allowing it to do a single local analysis to resolve physical
8 // register lifetimes in each basic block).
11 // each virtual and _register allocatable_ physical register in a function. It
12 // uses the dominance properties of SSA form to efficiently compute live
13 // variables for virtual registers, and assumes that physical registers are only
14 // live within a single basic block (allowing it to do a single local analysis
15 // to resolve physical register lifetimes in each basic block). If a physical
16 // register is not register allocatable, it is not tracked. This is useful for
17 // things like the stack pointer and condition codes.
918 //
1019 //===----------------------------------------------------------------------===//
1120
5766 ///
5867 std::multimap RegistersDead;
5968
69 /// AllocatablePhysicalRegisters - This vector keeps track of which registers
70 /// are actually register allocatable by the target machine. We can not track
71 /// liveness for values that are not in this set.
72 ///
73 std::vector AllocatablePhysicalRegisters;
6074 private: // Intermediate data structures
6175
6276 /// BBMap - Maps LLVM basic blocks to their corresponding machine basic block.