diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-12-06 22:12:01 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-12-06 22:12:01 +0000 |
commit | 2a81dd4a3c21457c7272b07c86c44885a974ab1e (patch) | |
tree | 73daa22f68f22a29b999681b766aaac9395b2738 /llvm/lib/CodeGen/RegisterCoalescer.cpp | |
parent | 1f5c5aa2095f0f2117bb995e004a7a4b2b422968 (diff) | |
download | bcm5719-llvm-2a81dd4a3c21457c7272b07c86c44885a974ab1e.tar.gz bcm5719-llvm-2a81dd4a3c21457c7272b07c86c44885a974ab1e.zip |
First chunk of MachineInstr bundle support.
1. Added opcode BUNDLE
2. Taught MachineInstr class to deal with bundled MIs
3. Changed MachineBasicBlock iterator to skip over bundled MIs; added an iterator to walk all the MIs
4. Taught MachineBasicBlock methods about bundled MIs
llvm-svn: 145975
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 8ba93a429c2..3866fc08691 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -710,7 +710,8 @@ bool RegisterCoalescer::RemoveCopyByCommutingDef(const CoalescerPair &CP, return false; if (NewMI != DefMI) { LIS->ReplaceMachineInstrInMaps(DefMI, NewMI); - MBB->insert(DefMI, NewMI); + MachineBasicBlock::iterator Pos = DefMI; + MBB->insert(Pos, NewMI); MBB->erase(DefMI); } unsigned OpIdx = NewMI->findRegisterUseOperandIdx(IntA.reg, false); |