mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
eliminate some iterator gymnastics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7679693fdf
commit
55e73a5493
@ -1541,10 +1541,8 @@ void SlotMachine::CreateModuleSlot(const GlobalValue *V) {
|
|||||||
unsigned DestSlot = 0;
|
unsigned DestSlot = 0;
|
||||||
const Type *VTy = V->getType();
|
const Type *VTy = V->getType();
|
||||||
|
|
||||||
TypedPlanes::iterator I = mMap.find(VTy);
|
ValuePlane &PlaneMap = mMap[VTy];
|
||||||
if (I == mMap.end())
|
DestSlot = PlaneMap.map[V] = PlaneMap.next_slot++;
|
||||||
I = mMap.insert(std::make_pair(VTy,ValuePlane())).first;
|
|
||||||
DestSlot = I->second.map[V] = I->second.next_slot++;
|
|
||||||
|
|
||||||
SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" <<
|
SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" <<
|
||||||
DestSlot << " [");
|
DestSlot << " [");
|
||||||
@ -1560,10 +1558,8 @@ void SlotMachine::CreateFunctionSlot(const Value *V) {
|
|||||||
|
|
||||||
unsigned DestSlot = 0;
|
unsigned DestSlot = 0;
|
||||||
|
|
||||||
TypedPlanes::iterator I = fMap.find(VTy);
|
ValuePlane &PlaneMap = fMap[VTy];
|
||||||
if (I == fMap.end())
|
DestSlot = PlaneMap.map[V] = PlaneMap.next_slot++;
|
||||||
I = fMap.insert(std::make_pair(VTy,ValuePlane())).first;
|
|
||||||
DestSlot = I->second.map[V] = I->second.next_slot++;
|
|
||||||
|
|
||||||
// G = Global, F = Function, o = other
|
// G = Global, F = Function, o = other
|
||||||
SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" <<
|
SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" <<
|
||||||
|
Loading…
Reference in New Issue
Block a user