summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/PPCGCodeGeneration.cpp
diff options
context:
space:
mode:
authorSiddharth Bhat <siddu.druid@gmail.com>2018-07-04 16:51:27 +0000
committerSiddharth Bhat <siddu.druid@gmail.com>2018-07-04 16:51:27 +0000
commit936c74ad0d59570f2a7d15709fd4039bfcb7cd70 (patch)
tree82ae2ba260dd783103d453259585f3769fc14732 /polly/lib/CodeGen/PPCGCodeGeneration.cpp
parent8ab5c2db8a7345143fc994718303fda2a63f90c3 (diff)
downloadbcm5719-llvm-936c74ad0d59570f2a7d15709fd4039bfcb7cd70.tar.gz
bcm5719-llvm-936c74ad0d59570f2a7d15709fd4039bfcb7cd70.zip
[PPCGCodeGen] Change printf to outs() to prevent garbled output. [NFC]
Summary: It appears that llvm uses unbuffered C++ streams. So, we should not mix C and C++ stream operations, because that will give us mixed up output. Reviewers: efriedma, jdoerfert, Meinersbur, gareevroman, sebpop, zinob, huihuiz, pollydev, grosser, singam-sanjay, philip.pfaffe Reviewed By: philip.pfaffe Subscribers: nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D40126 llvm-svn: 336288
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index a5f62b8eef1..13a4376682b 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -3163,7 +3163,7 @@ public:
auto *Options = isl_ast_print_options_alloc(S->getIslCtx().get());
P = isl_ast_node_print(Kernel->tree, P, Options);
char *String = isl_printer_get_str(P);
- printf("%s\n", String);
+ outs() << String << "\n";
free(String);
isl_printer_free(P);
}
@@ -3184,13 +3184,13 @@ public:
isl_ast_print_options_set_print_user(Options, printHostUser, &Data);
P = isl_ast_node_print(Tree, P, Options);
char *String = isl_printer_get_str(P);
- printf("# host\n");
- printf("%s\n", String);
+ outs() << "# host\n";
+ outs() << String << "\n";
free(String);
isl_printer_free(P);
for (auto Kernel : Data.Kernels) {
- printf("# kernel%d\n", Kernel->id);
+ outs() << "# kernel" << Kernel->id << "\n";
printKernel(Kernel);
}
}
@@ -3255,17 +3255,17 @@ public:
else
P = isl_printer_print_str(P, "No schedule found\n");
- printf("%s\n", isl_printer_get_str(P));
+ outs() << isl_printer_get_str(P) << "\n";
isl_printer_free(P);
}
if (DumpCode) {
- printf("Code\n");
- printf("====\n");
+ outs() << "Code\n";
+ outs() << "====\n";
if (PPCGGen->tree)
printGPUTree(PPCGGen->tree, PPCGProg);
else
- printf("No code generated\n");
+ outs() << "No code generated\n";
}
isl_schedule_free(Schedule);
OpenPOWER on IntegriCloud