summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/Cloog.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-02-05 18:01:29 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-02-05 18:01:29 +0000
commitc14582f2767fe47a1f7e3ed3aafefb17366d95dc (patch)
tree583e82ae0b4653a80bb83ca8bdffdb9dc2139537 /polly/lib/CodeGen/Cloog.cpp
parentdc69f6fbcab636e72b75d1ab1e7b0758725005db (diff)
downloadbcm5719-llvm-c14582f2767fe47a1f7e3ed3aafefb17366d95dc.tar.gz
bcm5719-llvm-c14582f2767fe47a1f7e3ed3aafefb17366d95dc.zip
CodeGen: clang-format goodness
The changed files are not yet clang-format clean, but we are getting close. llvm-svn: 174403
Diffstat (limited to 'polly/lib/CodeGen/Cloog.cpp')
-rw-r--r--polly/lib/CodeGen/Cloog.cpp50
1 files changed, 15 insertions, 35 deletions
diff --git a/polly/lib/CodeGen/Cloog.cpp b/polly/lib/CodeGen/Cloog.cpp
index 56745491729..4f0bef4f28a 100644
--- a/polly/lib/CodeGen/Cloog.cpp
+++ b/polly/lib/CodeGen/Cloog.cpp
@@ -97,9 +97,7 @@ public:
//close(FD[1]);
}
- FILE *getInputFile() {
- return input;
- }
+ FILE *getInputFile() { return input; }
void closeInput() {
fclose(input);
@@ -141,9 +139,7 @@ void Cloog::pprint(raw_ostream &OS) {
}
/// Create the Cloog AST from this program.
-struct clast_root *Cloog::getClast() {
- return (clast_root*)ClastRoot;
-}
+struct clast_root *Cloog::getClast() { return (clast_root *)ClastRoot; }
void Cloog::buildCloogOptions() {
Options = cloog_options_malloc(State);
@@ -217,7 +213,7 @@ CloogInput *Cloog::buildCloogInput() {
}
void ClastVisitor::visit(const clast_stmt *stmt) {
- if (CLAST_STMT_IS_A(stmt, stmt_root))
+ if (CLAST_STMT_IS_A(stmt, stmt_root))
assert(false && "No second root statement expected");
else if (CLAST_STMT_IS_A(stmt, stmt_ass))
return visitAssignment((const clast_assignment *)stmt);
@@ -234,20 +230,13 @@ void ClastVisitor::visit(const clast_stmt *stmt) {
visit(stmt->next);
}
-void ClastVisitor::visitAssignment(const clast_assignment *stmt) {
-}
+void ClastVisitor::visitAssignment(const clast_assignment *stmt) {}
-void ClastVisitor::visitBlock(const clast_block *stmt) {
- visit(stmt->body);
-}
+void ClastVisitor::visitBlock(const clast_block *stmt) { visit(stmt->body); }
-void ClastVisitor::visitFor(const clast_for *stmt) {
- visit(stmt->body);
-}
+void ClastVisitor::visitFor(const clast_for *stmt) { visit(stmt->body); }
-void ClastVisitor::visitGuard(const clast_guard *stmt) {
- visit(stmt->then);
-}
+void ClastVisitor::visitGuard(const clast_guard *stmt) { visit(stmt->then); }
} // End namespace polly.
@@ -295,7 +284,7 @@ bool CloogExporter::runOnScop(Scop &S) {
std::string Filename = getFileName(&R);
errs() << "Writing Scop '" << R.getNameStr() << "' in function '"
- << FunctionName << "' to '" << Filename << "'...\n";
+ << FunctionName << "' to '" << Filename << "'...\n";
FILE *F = fopen(Filename.c_str(), "w");
C.dump(F);
@@ -310,29 +299,20 @@ void CloogExporter::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<CloogInfo>();
}
-static RegisterPass<CloogExporter> A("polly-export-cloog",
- "Polly - Export the Cloog input file"
- " (Writes a .cloog file for each Scop)"
- );
+static RegisterPass<CloogExporter>
+A("polly-export-cloog", "Polly - Export the Cloog input file"
+ " (Writes a .cloog file for each Scop)");
-llvm::Pass *polly::createCloogExporterPass() {
- return new CloogExporter();
-}
+llvm::Pass *polly::createCloogExporterPass() { return new CloogExporter(); }
/// Write a .cloog input file
-void CloogInfo::dump(FILE *F) {
- C->dump(F);
-}
+void CloogInfo::dump(FILE *F) { C->dump(F); }
/// Print a source code representation of the program.
-void CloogInfo::pprint(llvm::raw_ostream &OS) {
- C->pprint(OS);
-}
+void CloogInfo::pprint(llvm::raw_ostream &OS) { C->pprint(OS); }
/// Create the Cloog AST from this program.
-const struct clast_root *CloogInfo::getClast() {
- return C->getClast();
-}
+const struct clast_root *CloogInfo::getClast() { return C->getClast(); }
void CloogInfo::releaseMemory() {
if (C) {
OpenPOWER on IntegriCloud