projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Avoid finalizeBundles infinite looping.
[oota-llvm.git]
/
lib
/
CodeGen
/
MachineInstrBundle.cpp
diff --git
a/lib/CodeGen/MachineInstrBundle.cpp
b/lib/CodeGen/MachineInstrBundle.cpp
index d1f2df94b5b906778f2a15e9217152b2e93ef748..73489a7160bf3949623a3062279d12e08c08b3c1 100644
(file)
--- a/
lib/CodeGen/MachineInstrBundle.cpp
+++ b/
lib/CodeGen/MachineInstrBundle.cpp
@@
-229,6
+229,8
@@
bool llvm::finalizeBundles(MachineFunction &MF) {
"First instr cannot be inside bundle before finalization!");
MachineBasicBlock::instr_iterator MIE = MBB.instr_end();
+ if (MII == MIE)
+ continue;
for (++MII; MII != MIE; ) {
if (!MII->isInsideBundle())
++MII;