aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveIntervals.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervals.h')
-rw-r--r--include/llvm/CodeGen/LiveIntervals.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveIntervals.h b/include/llvm/CodeGen/LiveIntervals.h
index 3769f07de7..24bc8956b3 100644
--- a/include/llvm/CodeGen/LiveIntervals.h
+++ b/include/llvm/CodeGen/LiveIntervals.h
@@ -126,7 +126,10 @@ namespace llvm {
};
static unsigned getBaseIndex(unsigned index) {
- return index - (index % 4);
+ return index - (index % InstrSlots::NUM);
+ }
+ static unsigned getBoundaryIndex(unsigned index) {
+ return getBaseIndex(index + InstrSlots::NUM - 1);
}
static unsigned getLoadIndex(unsigned index) {
return getBaseIndex(index) + InstrSlots::LOAD;