summaryrefslogtreecommitdiffstats
path: root/llvm/lib/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
commit91caf1d039cc77aeff9d6f0076c681c8368df13b (patch)
tree9052dcd659021f665b66d17264b78f2d25503c52 /llvm/lib/CodeGen
parent39ec7f049d56eea7475286ad8c073c9924bada28 (diff)
downloadbcm5719-llvm-91caf1d039cc77aeff9d6f0076c681c8368df13b.tar.gz
bcm5719-llvm-91caf1d039cc77aeff9d6f0076c681c8368df13b.zip
allow a virtual register to be associated with live-in values.
llvm-svn: 21927
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 405d9ec6504..d75bf3fb0ef 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -95,7 +95,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
// beginning of the function that we will pretend "defines" the values. This
// is to make the interval analysis simpler by providing a number.
if (fn.livein_begin() != fn.livein_end()) {
- unsigned FirstLiveIn = *fn.livein_begin();
+ unsigned FirstLiveIn = fn.livein_begin()->first;
// Find a reg class that contains this live in.
const TargetRegisterClass *RC = 0;
@@ -128,11 +128,11 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
// Note intervals due to live-in values.
if (fn.livein_begin() != fn.livein_end()) {
MachineBasicBlock *Entry = fn.begin();
- for (MachineFunction::liveinout_iterator I = fn.livein_begin(),
+ for (MachineFunction::livein_iterator I = fn.livein_begin(),
E = fn.livein_end(); I != E; ++I) {
handlePhysicalRegisterDef(Entry, Entry->begin(),
- getOrCreateInterval(*I), 0, 0);
- for (const unsigned* AS = mri_->getAliasSet(*I); *AS; ++AS)
+ getOrCreateInterval(I->first), 0, 0);
+ for (const unsigned* AS = mri_->getAliasSet(I->first); *AS; ++AS)
handlePhysicalRegisterDef(Entry, Entry->begin(),
getOrCreateInterval(*AS), 0, 0);
}
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 94380ff542d..c11e00f0c8d 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -165,11 +165,11 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
VirtRegInfo.resize(64);
// Mark live-in registers as live-in.
- for (MachineFunction::liveinout_iterator I = MF.livein_begin(),
+ for (MachineFunction::livein_iterator I = MF.livein_begin(),
E = MF.livein_end(); I != E; ++I) {
- assert(MRegisterInfo::isPhysicalRegister(*I) &&
+ assert(MRegisterInfo::isPhysicalRegister(I->first) &&
"Cannot have a live-in virtual register!");
- HandlePhysRegDef(*I, 0);
+ HandlePhysRegDef(I->first, 0);
}
// Calculate live variable information in depth first order on the CFG of the
@@ -272,7 +272,7 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
// it as using all of the live-out values in the function.
if (!MBB->empty() && TII.isReturn(MBB->back().getOpcode())) {
MachineInstr *Ret = &MBB->back();
- for (MachineFunction::liveinout_iterator I = MF.liveout_begin(),
+ for (MachineFunction::liveout_iterator I = MF.liveout_begin(),
E = MF.liveout_end(); I != E; ++I) {
assert(MRegisterInfo::isPhysicalRegister(*I) &&
"Cannot have a live-in virtual register!");
OpenPOWER on IntegriCloud