aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-13 07:08:07 +0000
committerChris Lattner <sabre@nondot.org>2005-05-13 07:08:07 +0000
commit712ad0c36dcfacb30620c793a6ffe4e80bd5d569 (patch)
tree26f8920823e50da06d9f443a3f44dbe0f4e89f3f /include/llvm/CodeGen
parentfe07581d789c0a1b329dd8956e3b68e71ae9fcfa (diff)
downloadexternal_llvm-712ad0c36dcfacb30620c793a6ffe4e80bd5d569.zip
external_llvm-712ad0c36dcfacb30620c793a6ffe4e80bd5d569.tar.gz
external_llvm-712ad0c36dcfacb30620c793a6ffe4e80bd5d569.tar.bz2
allow a virtual register to be associated with live-in values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index d9afd8d..4810742 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -108,7 +108,10 @@ class MachineFunction : private Annotation {
/// LiveIns/LiveOuts - Keep track of the physical registers that are
/// livein/liveout of the function. Live in values are typically arguments in
/// registers, live out values are typically return values in registers.
- std::vector<unsigned> LiveIns, LiveOuts;
+ /// LiveIn values are allowed to have virtual registers associated with them,
+ /// stored in the second element.
+ std::vector<std::pair<unsigned, unsigned> > LiveIns;
+ std::vector<unsigned> LiveOuts;
public:
MachineFunction(const Function *Fn, const TargetMachine &TM);
@@ -177,16 +180,20 @@ public:
/// addLiveIn/Out - Add the specified register as a live in/out. Note that it
/// is an error to add the same register to the same set more than once.
- void addLiveIn(unsigned Reg) { LiveIns.push_back(Reg); }
+ void addLiveIn(unsigned Reg, unsigned vreg = 0) {
+ LiveIns.push_back(std::make_pair(Reg, vreg));
+ }
void addLiveOut(unsigned Reg) { LiveOuts.push_back(Reg); }
// Iteration support for live in/out sets. These sets are kept in sorted
// order by their register number.
- typedef std::vector<unsigned>::const_iterator liveinout_iterator;
- liveinout_iterator livein_begin() const { return LiveIns.begin(); }
- liveinout_iterator livein_end() const { return LiveIns.end(); }
- liveinout_iterator liveout_begin() const { return LiveOuts.begin(); }
- liveinout_iterator liveout_end() const { return LiveOuts.end(); }
+ typedef std::vector<std::pair<unsigned,unsigned> >::const_iterator
+ livein_iterator;
+ typedef std::vector<unsigned>::const_iterator liveout_iterator;
+ livein_iterator livein_begin() const { return LiveIns.begin(); }
+ livein_iterator livein_end() const { return LiveIns.end(); }
+ liveout_iterator liveout_begin() const { return LiveOuts.begin(); }
+ liveout_iterator liveout_end() const { return LiveOuts.end(); }
/// getBlockNumbered - MachineBasicBlocks are automatically numbered when they
/// are inserted into the machine function. The block number for a machine