From b3e30c32ce6ac2cc73192df19dfe712e5be0364d Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 11 Apr 2017 00:12:58 +0000 Subject: Update for alloca construction changes llvm-svn: 299905 --- polly/lib/CodeGen/RuntimeDebugBuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'polly/lib/CodeGen/RuntimeDebugBuilder.cpp') 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}); -- cgit v1.2.3