Skip to content

Commit 8db4d53

Browse files
committed
Hide two unused debugging methods, NFCI.
GCC correctly moans that PlainCFGBuilder::isExternalDef(llvm::Value*) and StackSafetyDataFlowAnalysis::verifyFixedPoint() are defined but not used in Release builds. Hide them behind 'ifndef NDEBUG'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355205 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5b3d808 commit 8db4d53

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/Analysis/StackSafetyAnalysis.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,9 @@ class StackSafetyDataFlowAnalysis {
415415
updateOneNode(F.first, F.second);
416416
}
417417
void runDataFlow();
418+
#ifndef NDEBUG
418419
void verifyFixedPoint();
420+
#endif
419421

420422
public:
421423
StackSafetyDataFlowAnalysis(
@@ -526,11 +528,13 @@ void StackSafetyDataFlowAnalysis::runDataFlow() {
526528
}
527529
}
528530

531+
#ifndef NDEBUG
529532
void StackSafetyDataFlowAnalysis::verifyFixedPoint() {
530533
WorkList.clear();
531534
updateAllNodes();
532535
assert(WorkList.empty());
533536
}
537+
#endif
534538

535539
StackSafetyGlobalInfo StackSafetyDataFlowAnalysis::run() {
536540
runDataFlow();

lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ class PlainCFGBuilder {
6363
void setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB);
6464
void fixPhiNodes();
6565
VPBasicBlock *getOrCreateVPBB(BasicBlock *BB);
66+
#ifndef NDEBUG
6667
bool isExternalDef(Value *Val);
68+
#endif
6769
VPValue *getOrCreateVPOperand(Value *IRVal);
6870
void createVPInstructionsForVPBB(VPBasicBlock *VPBB, BasicBlock *BB);
6971

@@ -118,6 +120,7 @@ VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
118120
return VPBB;
119121
}
120122

123+
#ifndef NDEBUG
121124
// Return true if \p Val is considered an external definition. An external
122125
// definition is either:
123126
// 1. A Value that is not an Instruction. This will be refined in the future.
@@ -153,6 +156,7 @@ bool PlainCFGBuilder::isExternalDef(Value *Val) {
153156
// Check whether Instruction definition is in loop body.
154157
return !TheLoop->contains(Inst);
155158
}
159+
#endif
156160

157161
// Create a new VPValue or retrieve an existing one for the Instruction's
158162
// operand \p IRVal. This function must only be used to create/retrieve VPValues

0 commit comments

Comments
 (0)