[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 14 17:55:53 PST 2007
Changes in directory llvm/lib/Transforms/IPO:
SimplifyLibCalls.cpp updated: 1.86 -> 1.87
---
Log message:
Eliminate calls to isInteger, generalizing code and tightening checks as needed.
---
Diffs of the changes: (+5 -5)
SimplifyLibCalls.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.86 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.87
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.86 Fri Jan 12 16:49:11 2007
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Sun Jan 14 19:55:30 2007
@@ -398,7 +398,7 @@
// Make sure the called function looks like exit (int argument, int return
// type, external linkage, not varargs).
virtual bool ValidateCalledFunction(const Function *F, SimplifyLibCalls &SLC){
- return F->arg_size() >= 1 && F->arg_begin()->getType()->isInteger();
+ return F->arg_size() >= 1 && F->arg_begin()->getType()->isIntegral();
}
virtual bool OptimizeCall(CallInst* ci, SimplifyLibCalls& SLC) {
@@ -960,8 +960,8 @@
Function::const_arg_iterator AI = F->arg_begin();
if (F->arg_size() != 3 || !isa<PointerType>(AI->getType())) return false;
if (!isa<PointerType>((++AI)->getType())) return false;
- if (!(++AI)->getType()->isInteger()) return false;
- if (!F->getReturnType()->isInteger()) return false;
+ if (!(++AI)->getType()->isIntegral()) return false;
+ if (!F->getReturnType()->isIntegral()) return false;
return true;
}
@@ -1725,8 +1725,8 @@
: LibCallOptimization("isascii", "Number of 'isascii' calls simplified") {}
virtual bool ValidateCalledFunction(const Function *F, SimplifyLibCalls &SLC){
- return F->arg_size() == 1 && F->arg_begin()->getType()->isInteger() &&
- F->getReturnType()->isInteger();
+ return F->arg_size() == 1 && F->arg_begin()->getType()->isIntegral() &&
+ F->getReturnType()->isIntegral();
}
/// @brief Perform the isascii optimization.
More information about the llvm-commits
mailing list