aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-15 02:07:36 +0000
committerDan Gohman <gohman@apple.com>2009-08-15 02:07:36 +0000
commitbd51c677390d8e13560cbf3ea972b95a5fbc1f9a (patch)
tree22d8f3d00cff4342fd5695a47736c999032775ac /lib
parent0d24bfbf92ee0c3fa604df6c2099f46ec9ad3a94 (diff)
downloadexternal_llvm-bd51c677390d8e13560cbf3ea972b95a5fbc1f9a.zip
external_llvm-bd51c677390d8e13560cbf3ea972b95a5fbc1f9a.tar.gz
external_llvm-bd51c677390d8e13560cbf3ea972b95a5fbc1f9a.tar.bz2
Simplify a few more things, eliminating a few more dependencies on
"the current basic block". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Alpha/AlphaISelDAGToDAG.cpp2
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
index ff1eefb..c40bba3 100644
--- a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
+++ b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
@@ -211,7 +211,6 @@ private:
/// GOT address into a register.
///
SDNode *AlphaDAGToDAGISel::getGlobalBaseReg() {
- MachineFunction *MF = BB->getParent();
unsigned GlobalBaseReg = getInstrInfo()->getGlobalBaseReg(MF);
return CurDAG->getRegister(GlobalBaseReg, TLI.getPointerTy()).getNode();
}
@@ -219,7 +218,6 @@ SDNode *AlphaDAGToDAGISel::getGlobalBaseReg() {
/// getGlobalRetAddr - Grab the return address.
///
SDNode *AlphaDAGToDAGISel::getGlobalRetAddr() {
- MachineFunction *MF = BB->getParent();
unsigned GlobalRetAddr = getInstrInfo()->getGlobalRetAddr(MF);
return CurDAG->getRegister(GlobalRetAddr, TLI.getPointerTy()).getNode();
}
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index f9e620a..d9a4dae 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -282,7 +282,7 @@ SDNode *PPCDAGToDAGISel::getGlobalBaseReg() {
if (!GlobalBaseReg) {
const TargetInstrInfo &TII = *TM.getInstrInfo();
// Insert the set of GlobalBaseReg into the first MBB of the function
- MachineBasicBlock &FirstMBB = BB->getParent()->front();
+ MachineBasicBlock &FirstMBB = MF->front();
MachineBasicBlock::iterator MBBI = FirstMBB.begin();
DebugLoc dl = DebugLoc::getUnknownLoc();