diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 20:45:27 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 20:45:27 +0000 |
commit | 2debd48ca790ac01be6e12e094fdf4fdcadc8364 (patch) | |
tree | b229efbe610fd45979698760f5e86f06ef60cf86 /lib/CodeGen/Splitter.cpp | |
parent | e6a6277d3683ef7aa9d799b32b5194a79eefde62 (diff) |
Rename SlotIndexes to match how they are used.
The old naming scheme (load/use/def/store) can be traced back to an old
linear scan article, but the names don't match how slots are actually
used.
The load and store slots are not needed after the deferred spill code
insertion framework was deleted.
The use and def slots don't make any sense because we are using
half-open intervals as is customary in C code, but the names suggest
closed intervals. In reality, these slots were used to distinguish
early-clobber defs from normal defs.
The new naming scheme also has 4 slots, but the names match how the
slots are really used. This is a purely mechanical renaming, but some
of the code makes a lot more sense now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Splitter.cpp')
-rw-r--r-- | lib/CodeGen/Splitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/Splitter.cpp b/lib/CodeGen/Splitter.cpp index 77973b72bb..16cf9b844e 100644 --- a/lib/CodeGen/Splitter.cpp +++ b/lib/CodeGen/Splitter.cpp @@ -141,7 +141,7 @@ namespace llvm { ls.lis->InsertMachineInstrInMaps(copy); - SlotIndex copyDefIdx = ls.lis->getInstructionIndex(copy).getDefIndex(); + SlotIndex copyDefIdx = ls.lis->getInstructionIndex(copy).getRegSlot(); VNInfo *newVal = getNewVNI(preHeaderRange->valno); newVal->def = copyDefIdx; @@ -175,7 +175,7 @@ namespace llvm { ls.lis->InsertMachineInstrInMaps(copy); - SlotIndex copyDefIdx = ls.lis->getInstructionIndex(copy).getDefIndex(); + SlotIndex copyDefIdx = ls.lis->getInstructionIndex(copy).getRegSlot(); // Blow away output range definition. outRange->valno->def = ls.lis->getInvalidIndex(); @@ -216,13 +216,13 @@ namespace llvm { SlotIndex instrIdx = ls.lis->getInstructionIndex(&instr); if (instr.modifiesRegister(li.reg, 0)) { LiveRange *defRange = - li.getLiveRangeContaining(instrIdx.getDefIndex()); + li.getLiveRangeContaining(instrIdx.getRegSlot()); if (defRange != 0) // May have caught this already. copyRange(*defRange); } if (instr.readsRegister(li.reg, 0)) { LiveRange *useRange = - li.getLiveRangeContaining(instrIdx.getUseIndex()); + li.getLiveRangeContaining(instrIdx.getRegSlot(true)); if (useRange != 0) { // May have caught this already. copyRange(*useRange); } |