[llvm] r301672 - [IPO/MergeFunctions] This function is used only under DEBUG().

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 12:39:45 PDT 2017


Author: davide
Date: Fri Apr 28 14:39:45 2017
New Revision: 301672

URL: http://llvm.org/viewvc/llvm-project?rev=301672&view=rev
Log:
[IPO/MergeFunctions] This function is used only under DEBUG().

Modified:
    llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp

Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=301672&r1=301671&r2=301672&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Fri Apr 28 14:39:45 2017
@@ -211,7 +211,9 @@ private:
 
   /// Checks the rules of order relation introduced among functions set.
   /// Returns true, if sanity check has been passed, and false if failed.
+#ifndef NDEBUG
   bool doSanityCheck(std::vector<WeakVH> &Worklist);
+#endif
 
   /// Insert a ComparableFunction into the FnTree, or merge it away if it's
   /// equal to one that's already present.
@@ -283,6 +285,7 @@ ModulePass *llvm::createMergeFunctionsPa
   return new MergeFunctions();
 }
 
+#ifndef NDEBUG
 bool MergeFunctions::doSanityCheck(std::vector<WeakVH> &Worklist) {
   if (const unsigned Max = NumFunctionsForSanityCheck) {
     unsigned TripleNumber = 0;
@@ -351,6 +354,7 @@ bool MergeFunctions::doSanityCheck(std::
   }
   return true;
 }
+#endif
 
 bool MergeFunctions::runOnModule(Module &M) {
   if (skipModule(M))




More information about the llvm-commits mailing list