summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen/RuntimeDebugBuilder.cpp')
-rw-r--r--polly/lib/CodeGen/RuntimeDebugBuilder.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
index dd2432ad31d..29f113dbd0c 100644
--- a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
+++ b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
@@ -163,20 +163,20 @@ void RuntimeDebugBuilder::createGPUPrinterT(PollyIRBuilder &Builder,
ArrayRef<Value *> Values) {
std::string str;
- // Allocate print buffer (assuming 2*32 bit per element)
- auto T = ArrayType::get(Builder.getInt32Ty(), Values.size() * 2);
- Value *Data = new AllocaInst(
- T, "polly.vprint.buffer",
- Builder.GetInsertBlock()->getParent()->getEntryBlock().begin());
-
auto *Zero = Builder.getInt64(0);
- auto *DataPtr = Builder.CreateGEP(Data, {Zero, Zero});
auto ToPrint = getGPUThreadIdentifiers(Builder);
ToPrint.push_back(Builder.CreateGlobalStringPtr("\n ", "", 4));
ToPrint.insert(ToPrint.end(), Values.begin(), Values.end());
+ // Allocate print buffer (assuming 2*32 bit per element)
+ auto T = ArrayType::get(Builder.getInt32Ty(), ToPrint.size() * 2);
+ Value *Data = new AllocaInst(
+ T, "polly.vprint.buffer",
+ Builder.GetInsertBlock()->getParent()->getEntryBlock().begin());
+ auto *DataPtr = Builder.CreateGEP(Data, {Zero, Zero});
+
int Offset = 0;
for (auto Val : ToPrint) {
auto Ptr = Builder.CreateGEP(DataPtr, Builder.getInt64(Offset));
OpenPOWER on IntegriCloud