aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-26 23:02:16 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-26 23:02:16 +0000
commit8f132618639eb2f53229018d5b7eafb9f2123d06 (patch)
treeafe8cc61e7ab0b9206bdc6b2330002f8cbf5cde8 /lib/Transforms
parentc915108e1daba81aa2a4f16d9681a942cbe4f8b5 (diff)
Add some debugging output so we can tell which calls are getting triggered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 656cbfc6bd..546926ee88 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -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 @@ bool SimplifyLibCalls::runOnModule(Module &M)
{
++SimplifiedLibCalls;
found_optimization = result = true;
+ DEBUG(std::cerr << "simplify-libcall: " << CO->getFunctionName());
}
}
}
@@ -534,8 +537,7 @@ public:
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