[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp

Reid Spencer reid at x10sys.com
Tue Apr 26 16:02:27 PDT 2005



Changes in directory llvm/lib/Transforms/IPO:

SimplifyLibCalls.cpp updated: 1.11 -> 1.12
---
Log message:

Add some debugging output so we can tell which calls are getting triggered


---
Diffs of the changes:  (+9 -7)

 SimplifyLibCalls.cpp |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)


Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.11 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.12
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.11	Tue Apr 26 17:49:48 2005
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp	Tue Apr 26 18:02:16 2005
@@ -16,15 +16,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Transforms/IPO.h"
-#include "llvm/Module.h"
-#include "llvm/Pass.h"
-#include "llvm/DerivedTypes.h"
+#define DEBUG_TYPE "argpromotion"
 #include "llvm/Constants.h"
+#include "llvm/DerivedTypes.h"
 #include "llvm/Instructions.h"
-#include "llvm/ADT/Statistic.h"
+#include "llvm/Module.h"
+#include "llvm/Pass.h"
 #include "llvm/ADT/hash_map"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Target/TargetData.h"
+#include "llvm/Transforms/IPO.h"
 #include <iostream>
 using namespace llvm;
 
@@ -167,6 +169,7 @@
                 {
                   ++SimplifiedLibCalls;
                   found_optimization = result = true;
+              DEBUG(std::cerr << "simplify-libcall: " << CO->getFunctionName());
                 }
               }
             }
@@ -534,8 +537,7 @@
   virtual bool ValidateCalledFunction(const Function* f, const TargetData& TD)
   {
     // Just make sure this has 4 arguments per LLVM spec.
-    return (f->arg_size() == 4) && 
-           (f->getReturnType() == Type::VoidTy);
+    return (f->arg_size() == 4);
   }
 
   /// Because of alignment and instruction information that we don't have, we






More information about the llvm-commits mailing list