From: Bob Wilson Date: Mon, 12 Oct 2009 19:01:12 +0000 (+0000) Subject: Change to return a value by reference. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9d16f2c0baf91445764751b7c92cd1ff6d6d43f8;p=oota-llvm.git Change to return a value by reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83873 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp index 2fad72e25c8..ed3c32532ab 100644 --- a/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -164,7 +164,7 @@ namespace { bool DecrementOldEntry(unsigned CPI, MachineInstr* CPEMI); int LookForExistingCPEntry(CPUser& U, unsigned UserOffset); bool LookForWater(CPUser&U, unsigned UserOffset, - MachineBasicBlock** NewMBB); + MachineBasicBlock *&NewMBB); MachineBasicBlock* AcceptWater(MachineBasicBlock *WaterBB, water_iterator IP); void CreateNewWater(unsigned CPUserIndex, unsigned UserOffset, @@ -947,13 +947,13 @@ MachineBasicBlock* ARMConstantIslands::AcceptWater(MachineBasicBlock *WaterBB, /// LookForWater - look for an existing entry in the WaterList in which /// we can place the CPE referenced from U so it's within range of U's MI. -/// Returns true if found, false if not. If it returns true, *NewMBB +/// Returns true if found, false if not. If it returns true, NewMBB /// is set to the WaterList entry. /// For ARM, we prefer the water that's farthest away. For Thumb, prefer /// water that will not introduce padding to water that will; within each /// group, prefer the water that's farthest away. bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset, - MachineBasicBlock** NewMBB) { + MachineBasicBlock *&NewMBB) { water_iterator IPThatWouldPad; MachineBasicBlock* WaterBBThatWouldPad = NULL; if (!WaterList.empty()) { @@ -971,7 +971,7 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset, IPThatWouldPad = IP; } } else { - *NewMBB = AcceptWater(WaterBB, IP); + NewMBB = AcceptWater(WaterBB, IP); return true; } } @@ -980,7 +980,7 @@ bool ARMConstantIslands::LookForWater(CPUser &U, unsigned UserOffset, } } if (isThumb && WaterBBThatWouldPad) { - *NewMBB = AcceptWater(WaterBBThatWouldPad, IPThatWouldPad); + NewMBB = AcceptWater(WaterBBThatWouldPad, IPThatWouldPad); return true; } return false; @@ -1114,7 +1114,7 @@ bool ARMConstantIslands::HandleConstantPoolUser(MachineFunction &MF, // away that will work. Forward references only for now (although later // we might find some that are backwards). - if (!LookForWater(U, UserOffset, &NewMBB)) { + if (!LookForWater(U, UserOffset, NewMBB)) { // No water found. DEBUG(errs() << "No water found\n"); CreateNewWater(CPUserIndex, UserOffset, &NewMBB);