Skip to content

Commit 4cf8da9

Browse files
committed
[SlotIndexes] Remove unused EXPENSIVE_CHECKS machinery
1 parent a5e280b commit 4cf8da9

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/include/llvm/CodeGen/SlotIndexes.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ class raw_ostream;
5858
void setIndex(unsigned index) {
5959
this->index = index;
6060
}
61-
62-
#ifdef EXPENSIVE_CHECKS
63-
// When EXPENSIVE_CHECKS is defined, "erased" index list entries will
64-
// actually be moved to a "graveyard" list, and have their pointers
65-
// poisoned, so that dangling SlotIndex access can be reliably detected.
66-
void setPoison() {
67-
intptr_t tmp = reinterpret_cast<intptr_t>(mi);
68-
assert(((tmp & 0x1) == 0x0) && "Pointer already poisoned?");
69-
tmp |= 0x1;
70-
mi = reinterpret_cast<MachineInstr*>(tmp);
71-
}
72-
73-
bool isPoisoned() const { return (reinterpret_cast<intptr_t>(mi) & 0x1) == 0x1; }
74-
#endif // EXPENSIVE_CHECKS
7561
};
7662

7763
template <>
@@ -110,10 +96,6 @@ class raw_ostream;
11096

11197
IndexListEntry* listEntry() const {
11298
assert(isValid() && "Attempt to compare reserved index.");
113-
#ifdef EXPENSIVE_CHECKS
114-
assert(!lie.getPointer()->isPoisoned() &&
115-
"Attempt to access deleted list-entry.");
116-
#endif // EXPENSIVE_CHECKS
11799
return lie.getPointer();
118100
}
119101

0 commit comments

Comments
 (0)