Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More LLVM_ENABLE_ABI_BREAKING_CHECKS fixes after #110883 #110918

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/GenericDomTreeConstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ struct SemiNCAInfo {
LLVM_DEBUG(dbgs() << "\t\tMarking visited not affected "
<< BlockNamePrinter(Succ) << "\n");
UnaffectedOnCurrentLevel.push_back(SuccTN);
#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
II.VisitedUnaffected.push_back(SuccTN);
#endif
} else {
Expand Down Expand Up @@ -849,7 +849,7 @@ struct SemiNCAInfo {
TN->setIDom(NCD);
}

#if defined(LLVM_ENABLE_ABI_BREAKING_CHECKS) && !defined(NDEBUG)
#if LLVM_ENABLE_ABI_BREAKING_CHECKS && !defined(NDEBUG)
for (const TreeNodePtr TN : II.VisitedUnaffected)
assert(TN->getLevel() == TN->getIDom()->getLevel() + 1 &&
"TN should have been updated by an affected ancestor");
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ bool IndVarSimplify::run(Loop *L) {

// Create a rewriter object which we'll use to transform the code with.
SCEVExpander Rewriter(*SE, DL, "indvars");
#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
Rewriter.setDebugType(DEBUG_TYPE);
#endif

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LoopPassManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ PreservedAnalyses FunctionToLoopPassAdaptor::run(Function &F,
Updater.CurrentL = L;
Updater.SkipCurrentLoop = false;

#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
// Save a parent loop pointer for asserts.
Updater.ParentL = L->getParentLoop();
#endif
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6188,7 +6188,7 @@ LSRInstance::LSRInstance(Loop *L, IVUsers &IU, ScalarEvolution &SE,

// Configure SCEVExpander already now, so the correct mode is used for
// isSafeToExpand() checks.
#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
Rewriter.setDebugType(DEBUG_TYPE);
#endif
Rewriter.disableCanonicalMode();
Expand Down Expand Up @@ -7084,7 +7084,7 @@ static bool ReduceLoopStrength(Loop *L, IVUsers &IU, ScalarEvolution &SE,
SmallVector<WeakTrackingVH, 16> DeadInsts;
const DataLayout &DL = L->getHeader()->getDataLayout();
SCEVExpander Rewriter(SE, DL, "lsr", false);
#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
Rewriter.setDebugType(DEBUG_TYPE);
#endif
unsigned numFolded = Rewriter.replaceCongruentIVs(L, &DT, DeadInsts, &TTI);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT,
LoopInfo *LI, const TargetTransformInfo *TTI,
SmallVectorImpl<WeakTrackingVH> &Dead) {
SCEVExpander Rewriter(*SE, SE->getDataLayout(), "indvars");
#ifndef NDEBUG
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
Rewriter.setDebugType(DEBUG_TYPE);
#endif
bool Changed = false;
Expand Down
2 changes: 2 additions & 0 deletions mlir/lib/Analysis/Presburger/PresburgerSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ using namespace presburger;
bool Identifier::isEqual(const Identifier &other) const {
if (value == nullptr || other.value == nullptr)
return false;
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
assert(value != other.value ||
(value == other.value && idType == other.idType &&
"Values of Identifiers are equal but their types do not match."));
#endif
return value == other.value;
}

Expand Down
Loading