Skip to content

Commit 1737f76

Browse files
committed
VisitedUnaffected
Signed-off-by: Benoit Jacob <[email protected]>
1 parent add6b2f commit 1737f76

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

llvm/include/llvm/Support/GenericDomTreeConstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ struct SemiNCAInfo {
815815
LLVM_DEBUG(dbgs() << "\t\tMarking visited not affected "
816816
<< BlockNamePrinter(Succ) << "\n");
817817
UnaffectedOnCurrentLevel.push_back(SuccTN);
818-
#ifndef NDEBUG
818+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
819819
II.VisitedUnaffected.push_back(SuccTN);
820820
#endif
821821
} else {
@@ -849,7 +849,7 @@ struct SemiNCAInfo {
849849
TN->setIDom(NCD);
850850
}
851851

852-
#if defined(LLVM_ENABLE_ABI_BREAKING_CHECKS) && !defined(NDEBUG)
852+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS && !defined(NDEBUG)
853853
for (const TreeNodePtr TN : II.VisitedUnaffected)
854854
assert(TN->getLevel() == TN->getIDom()->getLevel() + 1 &&
855855
"TN should have been updated by an affected ancestor");

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ bool IndVarSimplify::run(Loop *L) {
19201920

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

llvm/lib/Transforms/Scalar/LoopPassManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ PreservedAnalyses FunctionToLoopPassAdaptor::run(Function &F,
293293
Updater.CurrentL = L;
294294
Updater.SkipCurrentLoop = false;
295295

296-
#ifndef NDEBUG
296+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
297297
// Save a parent loop pointer for asserts.
298298
Updater.ParentL = L->getParentLoop();
299299
#endif

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6188,7 +6188,7 @@ LSRInstance::LSRInstance(Loop *L, IVUsers &IU, ScalarEvolution &SE,
61886188

61896189
// Configure SCEVExpander already now, so the correct mode is used for
61906190
// isSafeToExpand() checks.
6191-
#ifndef NDEBUG
6191+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
61926192
Rewriter.setDebugType(DEBUG_TYPE);
61936193
#endif
61946194
Rewriter.disableCanonicalMode();
@@ -7084,7 +7084,7 @@ static bool ReduceLoopStrength(Loop *L, IVUsers &IU, ScalarEvolution &SE,
70847084
SmallVector<WeakTrackingVH, 16> DeadInsts;
70857085
const DataLayout &DL = L->getHeader()->getDataLayout();
70867086
SCEVExpander Rewriter(SE, DL, "lsr", false);
7087-
#ifndef NDEBUG
7087+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
70887088
Rewriter.setDebugType(DEBUG_TYPE);
70897089
#endif
70907090
unsigned numFolded = Rewriter.replaceCongruentIVs(L, &DT, DeadInsts, &TTI);

llvm/lib/Transforms/Utils/SimplifyIndVar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT,
10241024
LoopInfo *LI, const TargetTransformInfo *TTI,
10251025
SmallVectorImpl<WeakTrackingVH> &Dead) {
10261026
SCEVExpander Rewriter(*SE, SE->getDataLayout(), "indvars");
1027-
#ifndef NDEBUG
1027+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
10281028
Rewriter.setDebugType(DEBUG_TYPE);
10291029
#endif
10301030
bool Changed = false;

mlir/lib/Analysis/Presburger/PresburgerSpace.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ using namespace presburger;
1818
bool Identifier::isEqual(const Identifier &other) const {
1919
if (value == nullptr || other.value == nullptr)
2020
return false;
21+
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
2122
assert(value != other.value ||
2223
(value == other.value && idType == other.idType &&
2324
"Values of Identifiers are equal but their types do not match."));
25+
#endif
2426
return value == other.value;
2527
}
2628

0 commit comments

Comments
 (0)