aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-25 00:45:18 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-09-25 00:45:18 +0000
commit011e5910719265ba5d41e8af2290e55c5eb50526 (patch)
tree6c265651e812c7f42d3292b0ed0bd5bbfbbcfde8
parent7c78e2624c4548ccf1bcfdbc2efaae401ec7f83e (diff)
downloadexternal_llvm-011e5910719265ba5d41e8af2290e55c5eb50526.zip
external_llvm-011e5910719265ba5d41e8af2290e55c5eb50526.tar.gz
external_llvm-011e5910719265ba5d41e8af2290e55c5eb50526.tar.bz2
Remove SlotIndex::PHI_BIT. It is no longer used by anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114779 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SlotIndexes.h37
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp6
-rw-r--r--lib/CodeGen/SlotIndexes.cpp6
-rw-r--r--lib/CodeGen/Splitter.cpp3
4 files changed, 13 insertions, 39 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h
index e069f89..6669075 100644
--- a/include/llvm/CodeGen/SlotIndexes.h
+++ b/include/llvm/CodeGen/SlotIndexes.h
@@ -13,10 +13,7 @@
//
// SlotIndex is mostly a proxy for entries of the SlotIndexList, a class which
// is held is LiveIntervals and provides the real numbering. This allows
-// LiveIntervals to perform largely transparent renumbering. The SlotIndex
-// class does hold a PHI bit, which determines whether the index relates to a
-// PHI use or def point, or an actual instruction. See the SlotIndex class
-// description for futher information.
+// LiveIntervals to perform largely transparent renumbering.
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SLOTINDEXES_H
@@ -130,12 +127,10 @@ namespace llvm {
enum Slot { LOAD, USE, DEF, STORE, NUM };
- static const unsigned PHI_BIT = 1 << 2;
+ PointerIntPair<IndexListEntry*, 2, unsigned> lie;
- PointerIntPair<IndexListEntry*, 3, unsigned> lie;
-
- SlotIndex(IndexListEntry *entry, unsigned phiAndSlot)
- : lie(entry, phiAndSlot) {
+ SlotIndex(IndexListEntry *entry, unsigned slot)
+ : lie(entry, slot) {
assert(entry != 0 && "Attempt to construct index with 0 pointer.");
}
@@ -149,7 +144,7 @@ namespace llvm {
/// Returns the slot for this SlotIndex.
Slot getSlot() const {
- return static_cast<Slot>(lie.getInt() & ~PHI_BIT);
+ return static_cast<Slot>(lie.getInt());
}
static inline unsigned getHashValue(const SlotIndex &v) {
@@ -166,22 +161,13 @@ namespace llvm {
static inline SlotIndex getTombstoneKey() {
return SlotIndex(IndexListEntry::getTombstoneKeyEntry(), 0);
}
-
+
/// Construct an invalid index.
SlotIndex() : lie(IndexListEntry::getEmptyKeyEntry(), 0) {}
- // Construct a new slot index from the given one, set the phi flag on the
- // new index to the value of the phi parameter.
- SlotIndex(const SlotIndex &li, bool phi)
- : lie(&li.entry(), phi ? PHI_BIT | li.getSlot() : (unsigned)li.getSlot()){
- assert(lie.getPointer() != 0 &&
- "Attempt to construct index with 0 pointer.");
- }
-
- // Construct a new slot index from the given one, set the phi flag on the
- // new index to the value of the phi parameter, and the slot to the new slot.
- SlotIndex(const SlotIndex &li, bool phi, Slot s)
- : lie(&li.entry(), phi ? PHI_BIT | s : (unsigned)s) {
+ // Construct a new slot index from the given one, and set the slot.
+ SlotIndex(const SlotIndex &li, Slot s)
+ : lie(&li.entry(), unsigned(s)) {
assert(lie.getPointer() != 0 &&
"Attempt to construct index with 0 pointer.");
}
@@ -236,11 +222,6 @@ namespace llvm {
return other.getIndex() - getIndex();
}
- /// Returns the state of the PHI bit.
- bool isPHI() const {
- return lie.getInt() & PHI_BIT;
- }
-
/// isLoad - Return true if this is a LOAD slot.
bool isLoad() const {
return getSlot() == LOAD;
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 2726fc3..d30596a 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -393,8 +393,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
// Create interval with one of a NEW value number. Note that this value
// number isn't actually defined by an instruction, weird huh? :)
if (PHIJoin) {
- ValNo = interval.getNextValue(SlotIndex(Start, true), 0, false,
- VNInfoAllocator);
+ ValNo = interval.getNextValue(Start, 0, false, VNInfoAllocator);
ValNo->setIsPHIDef(true);
}
LiveRange LR(Start, killIdx, ValNo);
@@ -673,8 +672,7 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
}
VNInfo *vni =
- interval.getNextValue(SlotIndex(getMBBStartIdx(MBB), true),
- 0, false, VNInfoAllocator);
+ interval.getNextValue(getMBBStartIdx(MBB), 0, false, VNInfoAllocator);
vni->setIsPHIDef(true);
LiveRange LR(start, end, vni);
diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp
index 4d362d5..b106d3a 100644
--- a/lib/CodeGen/SlotIndexes.cpp
+++ b/lib/CodeGen/SlotIndexes.cpp
@@ -199,11 +199,7 @@ void SlotIndexes::dump() const {
// Print a SlotIndex to a raw_ostream.
void SlotIndex::print(raw_ostream &os) const {
- os << entry().getIndex();
- if (isPHI())
- os << "*";
- else
- os << "LudS"[getSlot()];
+ os << entry().getIndex() << "LudS"[getSlot()];
}
// Dump a SlotIndex to stderr.
diff --git a/lib/CodeGen/Splitter.cpp b/lib/CodeGen/Splitter.cpp
index 38f3b1f..1cb2f62 100644
--- a/lib/CodeGen/Splitter.cpp
+++ b/lib/CodeGen/Splitter.cpp
@@ -178,8 +178,7 @@ namespace llvm {
li.removeRange(ls.lis->getMBBStartIdx(outBlock), copyDefIdx);
VNInfo *newVal =
- getNewLI()->getNextValue(SlotIndex(ls.lis->getMBBStartIdx(outBlock),
- true),
+ getNewLI()->getNextValue(ls.lis->getMBBStartIdx(outBlock),
0, false, ls.lis->getVNInfoAllocator());
getNewLI()->addRange(LiveRange(ls.lis->getMBBStartIdx(outBlock),