diff options
author | Hongbin Zheng <etherzhhb@gmail.com> | 2012-04-25 08:01:38 +0000 |
---|---|---|
committer | Hongbin Zheng <etherzhhb@gmail.com> | 2012-04-25 08:01:38 +0000 |
commit | 86a37745eb4f5e906daf14c8c4c9018687dac133 (patch) | |
tree | bc60c5bc9222917f7ba5a450e256b55d24a9da20 | |
parent | 3ec7c2aa84ad1f927ab65372c03a3e57256ed354 (diff) | |
download | bcm5719-llvm-86a37745eb4f5e906daf14c8c4c9018687dac133.tar.gz bcm5719-llvm-86a37745eb4f5e906daf14c8c4c9018687dac133.zip |
Minor change: Replace convertInt in ScopInfo.cpp by utostr_32, which is
defined in StringExtras.h.
llvm-svn: 155539
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index c849fd34359..7c5ce1d2d53 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -31,6 +31,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/SetVector.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" #define DEBUG_TYPE "polly-scops" @@ -53,23 +54,6 @@ using namespace polly; STATISTIC(ScopFound, "Number of valid Scops"); STATISTIC(RichScopFound, "Number of Scops containing a loop"); -/// Convert an int into a string. -static std::string convertInt(int number) -{ - if (number == 0) - return "0"; - std::string temp = ""; - std::string returnvalue = ""; - while (number > 0) - { - temp += number % 10 + 48; - number /= 10; - } - for (unsigned i = 0; i < temp.length(); i++) - returnvalue+=temp[temp.length() - i - 1]; - return returnvalue; -} - /// Translate a SCEVExpression into an isl_pw_aff object. struct SCEVAffinator : public SCEVVisitor<SCEVAffinator, isl_pw_aff*> { private: @@ -775,7 +759,7 @@ __isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) const { } if (ParameterName == "" || ParameterName.substr(0, 2) == "p_") - ParameterName = "p_" + convertInt(IdIter->second); + ParameterName = "p_" + utostr_32(IdIter->second); return isl_id_alloc(getIslCtx(), ParameterName.c_str(), (void *) Parameter); } |