Skip to content

Commit df2ea2f

Browse files
author
Zain Jaffal
committed
[ConstriantElimination] Add NODEBUG condition around dump
1 parent 8a7b5e0 commit df2ea2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Analysis/ConstraintSystem.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ bool ConstraintSystem::mayHaveSolutionImpl() {
114114

115115
SmallVector<std::string> ConstraintSystem::getVarNamesList() const {
116116
SmallVector<std::string> Names(Value2Index.size(), "");
117+
#ifndef NDEBUG
117118
for (auto &[V, Index] : Value2Index) {
118119
std::string OperandName;
119120
if (V->getName().empty())
@@ -122,10 +123,12 @@ SmallVector<std::string> ConstraintSystem::getVarNamesList() const {
122123
OperandName = std::string("%") + V->getName().str();
123124
Names[Index - 1] = OperandName;
124125
}
126+
#endif
125127
return Names;
126128
}
127129

128130
void ConstraintSystem::dump() const {
131+
#ifndef NDEBUG
129132
if (Constraints.empty())
130133
return;
131134
SmallVector<std::string> Names = getVarNamesList();
@@ -143,6 +146,7 @@ void ConstraintSystem::dump() const {
143146
LLVM_DEBUG(dbgs() << join(Parts, std::string(" + "))
144147
<< " <= " << std::to_string(Row[0]) << "\n");
145148
}
149+
#endif
146150
}
147151

148152
bool ConstraintSystem::mayHaveSolution() {

0 commit comments

Comments
 (0)