summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SlotIndexes.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-02-15 04:33:48 +0000
committerLang Hames <lhames@gmail.com>2012-02-15 04:33:48 +0000
commitac597ecfbc0b519ffcbf5f4160262a2c39f59fe6 (patch)
tree4869180000db57a4aeeb2809f6568a9e6d929663 /include/llvm/CodeGen/SlotIndexes.h
parent79bf288584215f3f3c49050ac1691a6b29c56fec (diff)
downloadllvm-ac597ecfbc0b519ffcbf5f4160262a2c39f59fe6.tar.gz
llvm-ac597ecfbc0b519ffcbf5f4160262a2c39f59fe6.tar.bz2
llvm-ac597ecfbc0b519ffcbf5f4160262a2c39f59fe6.tar.xz
Add a check to make sure we don't assign slot indexes for instructions inside bundles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SlotIndexes.h')
-rw-r--r--include/llvm/CodeGen/SlotIndexes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h
index b1813b3419..05daddbcff 100644
--- a/include/llvm/CodeGen/SlotIndexes.h
+++ b/include/llvm/CodeGen/SlotIndexes.h
@@ -648,6 +648,8 @@ namespace llvm {
/// instructions, create the new index after the null indexes instead of
/// before them.
SlotIndex insertMachineInstrInMaps(MachineInstr *mi, bool Late = false) {
+ assert(!mi->isInsideBundle() &&
+ "Instructions inside bundles should use bundle start's slot.");
assert(mi2iMap.find(mi) == mi2iMap.end() && "Instr already indexed.");
// Numbering DBG_VALUE instructions could cause code generation to be
// affected by debug information.