[llvm-commits] [polly] r155539 - /polly/trunk/lib/Analysis/ScopInfo.cpp
Hongbin Zheng
etherzhhb at gmail.com
Wed Apr 25 01:01:39 PDT 2012
Author: ether
Date: Wed Apr 25 03:01:38 2012
New Revision: 155539
URL: http://llvm.org/viewvc/llvm-project?rev=155539&view=rev
Log:
Minor change: Replace convertInt in ScopInfo.cpp by utostr_32, which is
defined in StringExtras.h.
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=155539&r1=155538&r2=155539&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Apr 25 03:01:38 2012
@@ -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 @@
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 @@
}
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);
}
More information about the llvm-commits
mailing list