aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-10-12 21:39:43 +0000
committerBob Wilson <bob.wilson@apple.com>2009-10-12 21:39:43 +0000
commit757652c5ba820bbea75d8713d7bf3749e4113778 (patch)
tree9172186a01bf7d3890da047df3e540295773895a /lib/Target
parentf98032ef64a777fe63d390539f901d7d6d4e868c (diff)
downloadexternal_llvm-757652c5ba820bbea75d8713d7bf3749e4113778.zip
external_llvm-757652c5ba820bbea75d8713d7bf3749e4113778.tar.gz
external_llvm-757652c5ba820bbea75d8713d7bf3749e4113778.tar.bz2
Change CreateNewWater method to return NewMBB by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 36eeffc..3016565 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -167,7 +167,7 @@ namespace {
MachineBasicBlock *&NewMBB);
MachineBasicBlock *AcceptWater(water_iterator IP);
void CreateNewWater(unsigned CPUserIndex, unsigned UserOffset,
- MachineBasicBlock** NewMBB);
+ MachineBasicBlock *&NewMBB);
bool HandleConstantPoolUser(MachineFunction &MF, unsigned CPUserIndex);
void RemoveDeadCPEMI(MachineInstr *CPEMI);
bool RemoveUnusedCPEntries();
@@ -992,12 +992,12 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset,
/// CPUsers[CPUserIndex], so create a place to put the CPE. The end of the
/// block is used if in range, and the conditional branch munged so control
/// flow is correct. Otherwise the block is split to create a hole with an
-/// unconditional branch around it. In either case *NewMBB is set to a
+/// unconditional branch around it. In either case NewMBB is set to a
/// block following which the new island can be inserted (the WaterList
/// is not adjusted).
-
void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex,
- unsigned UserOffset, MachineBasicBlock** NewMBB) {
+ unsigned UserOffset,
+ MachineBasicBlock *&NewMBB) {
CPUser &U = CPUsers[CPUserIndex];
MachineInstr *UserMI = U.MI;
MachineInstr *CPEMI = U.CPEMI;
@@ -1019,7 +1019,7 @@ void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex,
DEBUG(errs() << "Split at end of block\n");
if (&UserMBB->back() == UserMI)
assert(BBHasFallthrough(UserMBB) && "Expected a fallthrough BB!");
- *NewMBB = next(MachineFunction::iterator(UserMBB));
+ NewMBB = next(MachineFunction::iterator(UserMBB));
// Add an unconditional branch from UserMBB to fallthrough block.
// Record it for branch lengthening; this new branch will not get out of
// range, but if the preceding conditional branch is out of range, the
@@ -1027,7 +1027,7 @@ void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex,
// range, so the machinery has to know about it.
int UncondBr = isThumb ? ((isThumb2) ? ARM::t2B : ARM::tB) : ARM::B;
BuildMI(UserMBB, DebugLoc::getUnknownLoc(),
- TII->get(UncondBr)).addMBB(*NewMBB);
+ TII->get(UncondBr)).addMBB(NewMBB);
unsigned MaxDisp = getUnconditionalBrDisp(UncondBr);
ImmBranches.push_back(ImmBranch(&UserMBB->back(),
MaxDisp, false, UncondBr));
@@ -1082,7 +1082,7 @@ void ARMConstantIslands::CreateNewWater(unsigned CPUserIndex,
}
}
DEBUG(errs() << "Split in middle of big block\n");
- *NewMBB = SplitBlockBeforeInstr(prior(MI));
+ NewMBB = SplitBlockBeforeInstr(prior(MI));
}
}
@@ -1116,7 +1116,7 @@ bool ARMConstantIslands::HandleConstantPoolUser(MachineFunction &MF,
if (!LookForWater(U, UserOffset, NewMBB)) {
// No water found.
DEBUG(errs() << "No water found\n");
- CreateNewWater(CPUserIndex, UserOffset, &NewMBB);
+ CreateNewWater(CPUserIndex, UserOffset, NewMBB);
}
// Okay, we know we can put an island before NewMBB now, do it!