summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Analysis/StackSafetyAnalysis.cpp4
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index 2bca7cf60fd..4cf235db86e 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -415,7 +415,9 @@ class StackSafetyDataFlowAnalysis {
updateOneNode(F.first, F.second);
}
void runDataFlow();
+#ifndef NDEBUG
void verifyFixedPoint();
+#endif
public:
StackSafetyDataFlowAnalysis(
@@ -526,11 +528,13 @@ void StackSafetyDataFlowAnalysis::runDataFlow() {
}
}
+#ifndef NDEBUG
void StackSafetyDataFlowAnalysis::verifyFixedPoint() {
WorkList.clear();
updateAllNodes();
assert(WorkList.empty());
}
+#endif
StackSafetyGlobalInfo StackSafetyDataFlowAnalysis::run() {
runDataFlow();
diff --git a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
index 0550253c21d..df96f67288f 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
@@ -63,7 +63,9 @@ private:
void setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB);
void fixPhiNodes();
VPBasicBlock *getOrCreateVPBB(BasicBlock *BB);
+#ifndef NDEBUG
bool isExternalDef(Value *Val);
+#endif
VPValue *getOrCreateVPOperand(Value *IRVal);
void createVPInstructionsForVPBB(VPBasicBlock *VPBB, BasicBlock *BB);
@@ -118,6 +120,7 @@ VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
return VPBB;
}
+#ifndef NDEBUG
// Return true if \p Val is considered an external definition. An external
// definition is either:
// 1. A Value that is not an Instruction. This will be refined in the future.
@@ -153,6 +156,7 @@ bool PlainCFGBuilder::isExternalDef(Value *Val) {
// Check whether Instruction definition is in loop body.
return !TheLoop->contains(Inst);
}
+#endif
// Create a new VPValue or retrieve an existing one for the Instruction's
// operand \p IRVal. This function must only be used to create/retrieve VPValues
OpenPOWER on IntegriCloud