]> granicus.if.org Git - llvm/commitdiff
Hide two unused debugging methods, NFCI.
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 1 Mar 2019 17:15:21 +0000 (17:15 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Fri, 1 Mar 2019 17:15:21 +0000 (17:15 +0000)
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

lib/Analysis/StackSafetyAnalysis.cpp
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp

index 2bca7cf60fdd2f3aa722e5400135d0fdff09b492..4cf235db86eb702c5219fde49594387573dfde55 100644 (file)
@@ -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();
index 0550253c21d8cb058f1a8dc60377ee897ceebac8..df96f67288f187f99d97bee5c466000c1f68a696 100644 (file)
@@ -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