summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopInfo.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2012-12-29 23:47:38 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2012-12-29 23:47:38 +0000
commit1bb59b0dcfccdaada07e2d180d5929a2dd0b1493 (patch)
tree2c619d2ce5d50cc8752b7e424dc24e4bcdd13512 /polly/lib/Analysis/ScopInfo.cpp
parent9463dce9bf90d63480c894452cc82db1de182823 (diff)
downloadbcm5719-llvm-1bb59b0dcfccdaada07e2d180d5929a2dd0b1493.tar.gz
bcm5719-llvm-1bb59b0dcfccdaada07e2d180d5929a2dd0b1493.zip
Fix obvious formatting problems.
We fix the following formatting problems found by clang-format: - 80 cols violations - Obvious problems with missing or too many spaces - multiple new lines in a row clang-format suggests many more changes, most of them falling in the following two categories: 1) clang-format does not at all format a piece of code nicely 2) The style that clang-format suggests does not match the style used in Polly/LLVM I consider differences caused by reason 1) bugs, which should be fixed by improving clang-format. Differences due to 2) need to be investigated closer to understand the cause of the difference and the solution that should be taken. llvm-svn: 171241
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index f0827b3acd7..b8772dbe52e 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -230,17 +230,16 @@ MemoryAccess::~MemoryAccess() {
isl_map_free(newAccessRelation);
}
-static void replace(std::string& str, const std::string& find,
- const std::string& replace) {
+static void replace(std::string &str, const std::string &find,
+ const std::string &replace) {
size_t pos = 0;
- while((pos = str.find(find, pos)) != std::string::npos)
- {
+ while ((pos = str.find(find, pos)) != std::string::npos) {
str.replace(pos, find.length(), replace);
pos += replace.length();
}
}
-static void makeIslCompatible(std::string& str) {
+static void makeIslCompatible(std::string &str) {
str.erase(0, 1);
replace(str, ".", "_");
replace(str, "\"", "_");
@@ -691,7 +690,7 @@ void ScopStmt::print(raw_ostream &OS) const {
OS.indent(16) << "n/a\n";
for (MemoryAccessVec::const_iterator I = MemAccs.begin(), E = MemAccs.end();
- I != E; ++I)
+ I != E; ++I)
(*I)->print(OS);
}
@@ -742,7 +741,7 @@ __isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) const {
void Scop::buildContext() {
isl_space *Space = isl_space_params_alloc(IslCtx, 0);
- Context = isl_set_universe (Space);
+ Context = isl_set_universe(Space);
}
void Scop::addParameterBounds() {
@@ -776,7 +775,6 @@ void Scop::addParameterBounds() {
}
}
-
void Scop::realignParams() {
// Add all parameters into a common model.
isl_space *Space = isl_space_params_alloc(IslCtx, ParameterIds.size());
@@ -826,7 +824,7 @@ Scop::~Scop() {
}
std::string Scop::getContextStr() const {
- return stringFromIslObj(Context);
+ return stringFromIslObj(Context);
}
std::string Scop::getNameStr() const {
@@ -875,13 +873,12 @@ void Scop::printContext(raw_ostream &OS) const {
void Scop::printStatements(raw_ostream &OS) const {
OS << "Statements {\n";
- for (const_iterator SI = begin(), SE = end();SI != SE; ++SI)
+ for (const_iterator SI = begin(), SE = end(); SI != SE; ++SI)
OS.indent(4) << (**SI);
OS.indent(4) << "}\n";
}
-
void Scop::print(raw_ostream &OS) const {
printContext(OS.indent(4));
printStatements(OS.indent(4));
@@ -964,8 +961,6 @@ ScopInfo::~ScopInfo() {
isl_ctx_free(ctx);
}
-
-
void ScopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addRequired<RegionInfo>();
OpenPOWER on IntegriCloud