[llvm] 4cf8da9 - [SlotIndexes] Remove unused EXPENSIVE_CHECKS machinery
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 04:21:27 PDT 2023
Author: Jay Foad
Date: 2023-09-21T12:21:22+01:00
New Revision: 4cf8da94198dcb3af2e8eefa1559bfe6c0c332dc
URL: https://github.com/llvm/llvm-project/commit/4cf8da94198dcb3af2e8eefa1559bfe6c0c332dc
DIFF: https://github.com/llvm/llvm-project/commit/4cf8da94198dcb3af2e8eefa1559bfe6c0c332dc.diff
LOG: [SlotIndexes] Remove unused EXPENSIVE_CHECKS machinery
Added:
Modified:
llvm/include/llvm/CodeGen/SlotIndexes.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 863f1f585ef99f0..1a8d117322fcc6e 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -58,20 +58,6 @@ class raw_ostream;
void setIndex(unsigned index) {
this->index = index;
}
-
-#ifdef EXPENSIVE_CHECKS
- // When EXPENSIVE_CHECKS is defined, "erased" index list entries will
- // actually be moved to a "graveyard" list, and have their pointers
- // poisoned, so that dangling SlotIndex access can be reliably detected.
- void setPoison() {
- intptr_t tmp = reinterpret_cast<intptr_t>(mi);
- assert(((tmp & 0x1) == 0x0) && "Pointer already poisoned?");
- tmp |= 0x1;
- mi = reinterpret_cast<MachineInstr*>(tmp);
- }
-
- bool isPoisoned() const { return (reinterpret_cast<intptr_t>(mi) & 0x1) == 0x1; }
-#endif // EXPENSIVE_CHECKS
};
template <>
@@ -110,10 +96,6 @@ class raw_ostream;
IndexListEntry* listEntry() const {
assert(isValid() && "Attempt to compare reserved index.");
-#ifdef EXPENSIVE_CHECKS
- assert(!lie.getPointer()->isPoisoned() &&
- "Attempt to access deleted list-entry.");
-#endif // EXPENSIVE_CHECKS
return lie.getPointer();
}
More information about the llvm-commits
mailing list