mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-07 21:20:18 +00:00
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47059 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9cec00e7f1
commit
b1f6f91393
@ -217,14 +217,14 @@ namespace llvm {
|
||||
/// maps used by register allocator.
|
||||
void ReplaceMachineInstrInMaps(MachineInstr *MI, MachineInstr *NewMI) {
|
||||
Mi2IndexMap::iterator mi2i = mi2iMap_.find(MI);
|
||||
if (mi2i != mi2iMap_.end()) {
|
||||
i2miMap_[mi2i->second/InstrSlots::NUM] = NewMI;
|
||||
Mi2IndexMap::const_iterator it = mi2iMap_.find(MI);
|
||||
assert(it != mi2iMap_.end() && "Invalid instruction!");
|
||||
unsigned Index = it->second;
|
||||
mi2iMap_.erase(MI);
|
||||
mi2iMap_[NewMI] = Index;
|
||||
}
|
||||
if (mi2i == mi2iMap_.end())
|
||||
return;
|
||||
i2miMap_[mi2i->second/InstrSlots::NUM] = NewMI;
|
||||
Mi2IndexMap::iterator it = mi2iMap_.find(MI);
|
||||
assert(it != mi2iMap_.end() && "Invalid instruction!");
|
||||
unsigned Index = it->second;
|
||||
mi2iMap_.erase(it);
|
||||
mi2iMap_[NewMI] = Index;
|
||||
}
|
||||
|
||||
BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user