diff options
Diffstat (limited to 'polly/lib/CodeGen/RuntimeDebugBuilder.cpp')
-rw-r--r-- | polly/lib/CodeGen/RuntimeDebugBuilder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp index bcc654b7e14..16a7a4c8608 100644 --- a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp +++ b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp @@ -170,10 +170,12 @@ void RuntimeDebugBuilder::createGPUPrinterT(PollyIRBuilder &Builder, ToPrint.push_back(Builder.CreateGlobalStringPtr("\n ", "", 4)); ToPrint.insert(ToPrint.end(), Values.begin(), Values.end()); + const DataLayout &DL = Builder.GetInsertBlock()->getModule()->getDataLayout(); + // 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", + T, DL.getAllocaAddrSpace(), "polly.vprint.buffer", &Builder.GetInsertBlock()->getParent()->getEntryBlock().front()); auto *DataPtr = Builder.CreateGEP(Data, {Zero, Zero}); |