[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 28 23:16:22 PDT 2005
Changes in directory llvm/lib/Transforms/IPO:
SimplifyLibCalls.cpp updated: 1.52 -> 1.53
---
Log message:
remove a bunch of unneeded stuff, or self evident comments
---
Diffs of the changes: (+6 -45)
SimplifyLibCalls.cpp | 51 ++++++---------------------------------------------
1 files changed, 6 insertions(+), 45 deletions(-)
Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.52 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.53
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.52 Wed Sep 28 23:54:20 2005
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp Thu Sep 29 01:16:11 2005
@@ -383,7 +383,6 @@
{
ExitInMainOptimization() : LibCallOptimization("exit",
"Number of 'exit' calls simplified") {}
- virtual ~ExitInMainOptimization() {}
// Make sure the called function looks like exit (int argument, int return
// type, external linkage, not varargs).
@@ -451,8 +450,6 @@
"Number of 'strcat' calls simplified") {}
public:
- /// @breif Destructor
- virtual ~StrCatOptimization() {}
/// @brief Make sure that the "strcat" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -540,7 +537,6 @@
public:
StrChrOptimization() : LibCallOptimization("strchr",
"Number of 'strchr' calls simplified") {}
- virtual ~StrChrOptimization() {}
/// @brief Make sure that the "strchr" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -632,7 +628,6 @@
public:
StrCmpOptimization() : LibCallOptimization("strcmp",
"Number of 'strcmp' calls simplified") {}
- virtual ~StrCmpOptimization() {}
/// @brief Make sure that the "strcmp" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -719,7 +714,6 @@
public:
StrNCmpOptimization() : LibCallOptimization("strncmp",
"Number of 'strncmp' calls simplified") {}
- virtual ~StrNCmpOptimization() {}
/// @brief Make sure that the "strncmp" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -822,7 +816,6 @@
public:
StrCpyOptimization() : LibCallOptimization("strcpy",
"Number of 'strcpy' calls simplified") {}
- virtual ~StrCpyOptimization() {}
/// @brief Make sure that the "strcpy" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -910,7 +903,6 @@
{
StrLenOptimization() : LibCallOptimization("strlen",
"Number of 'strlen' calls simplified") {}
- virtual ~StrLenOptimization() {}
/// @brief Make sure that the "strlen" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
@@ -1113,8 +1105,6 @@
LLVMMemCpyOptimization(const char* fname, const char* desc)
: LibCallOptimization(fname, desc) {}
public:
- /// @brief Destructor
- virtual ~LLVMMemCpyOptimization() {}
/// @brief Make sure that the "memcpy" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& TD)
@@ -1199,8 +1189,6 @@
"Number of 'llvm.memset' calls simplified") {}
public:
- /// @brief Destructor
- virtual ~LLVMMemSetOptimization() {}
/// @brief Make sure that the "memset" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& TD)
@@ -1307,9 +1295,6 @@
PowOptimization() : LibCallOptimization("pow",
"Number of 'pow' calls simplified") {}
- /// @brief Destructor
- virtual ~PowOptimization() {}
-
/// @brief Make sure that the "pow" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -1384,9 +1369,6 @@
FPrintFOptimization() : LibCallOptimization("fprintf",
"Number of 'fprintf' calls simplified") {}
- /// @brief Destructor
- virtual ~FPrintFOptimization() {}
-
/// @brief Make sure that the "fprintf" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -1520,9 +1502,6 @@
SPrintFOptimization() : LibCallOptimization("sprintf",
"Number of 'sprintf' calls simplified") {}
- /// @brief Destructor
- virtual ~SPrintFOptimization() {}
-
/// @brief Make sure that the "fprintf" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -1657,9 +1636,6 @@
PutsOptimization() : LibCallOptimization("fputs",
"Number of 'fputs' calls simplified") {}
- /// @brief Destructor
- virtual ~PutsOptimization() {}
-
/// @brief Make sure that the "fputs" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -1723,17 +1699,12 @@
/// This LibCallOptimization will simplify calls to the "isdigit" library
/// function. It simply does range checks the parameter explicitly.
/// @brief Simplify the isdigit library function.
-struct IsDigitOptimization : public LibCallOptimization
-{
+struct isdigitOptimization : public LibCallOptimization {
public:
- /// @brief Default Constructor
- IsDigitOptimization() : LibCallOptimization("isdigit",
+ isdigitOptimization() : LibCallOptimization("isdigit",
"Number of 'isdigit' calls simplified") {}
- /// @brief Destructor
- virtual ~IsDigitOptimization() {}
-
- /// @brief Make sure that the "fputs" function has the right prototype
+ /// @brief Make sure that the "isdigit" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
// Just make sure this has 1 argument
@@ -1772,7 +1743,9 @@
ci->eraseFromParent();
return true;
}
-} IsDigitOptimizer;
+} isdigitOptimizer;
+
+
/// This LibCallOptimization will simplify calls to the "toascii" library
/// function. It simply does the corresponding and operation to restrict the
@@ -1785,9 +1758,6 @@
ToAsciiOptimization() : LibCallOptimization("toascii",
"Number of 'toascii' calls simplified") {}
- /// @brief Destructor
- virtual ~ToAsciiOptimization() {}
-
/// @brief Make sure that the "fputs" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -1826,9 +1796,6 @@
FFSOptimization() : LibCallOptimization("ffs",
"Number of 'ffs' calls simplified") {}
- /// @brief Destructor
- virtual ~FFSOptimization() {}
-
/// @brief Make sure that the "fputs" function has the right prototype
virtual bool ValidateCalledFunction(const Function* f, SimplifyLibCalls& SLC)
{
@@ -2070,12 +2037,6 @@
// exp, expf, expl:
// * exp(log(x)) -> x
//
-// isascii:
-// * isascii(c) -> ((c & ~0x7f) == 0)
-//
-// isdigit:
-// * isdigit(c) -> (unsigned)(c) - '0' <= 9
-//
// log, logf, logl:
// * log(exp(x)) -> x
// * log(x**y) -> y*log(x)
More information about the llvm-commits
mailing list