[polly] r311440 - [ManagedMemoryRewrite] Use `unit64_t` to store size, not `int`.

Siddharth Bhat via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 02:30:37 PDT 2017


Author: bollu
Date: Tue Aug 22 02:30:37 2017
New Revision: 311440

URL: http://llvm.org/viewvc/llvm-project?rev=311440&view=rev
Log:
[ManagedMemoryRewrite] Use `unit64_t` to store size, not `int`.

Modified:
    polly/trunk/lib/CodeGen/ManagedMemoryRewrite.cpp

Modified: polly/trunk/lib/CodeGen/ManagedMemoryRewrite.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/ManagedMemoryRewrite.cpp?rev=311440&r1=311439&r2=311440&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/ManagedMemoryRewrite.cpp (original)
+++ polly/trunk/lib/CodeGen/ManagedMemoryRewrite.cpp Tue Aug 22 02:30:37 2017
@@ -311,7 +311,8 @@ static void rewriteAllocaAsManagedMemory
   Builder.SetInsertPoint(Alloca);
 
   Value *MallocManagedFn = getOrCreatePollyMallocManaged(*Alloca->getModule());
-  const int Size = DL.getTypeAllocSize(Alloca->getType()->getElementType());
+  const uint64_t Size =
+      DL.getTypeAllocSize(Alloca->getType()->getElementType());
   Value *SizeVal = Builder.getInt64(Size);
   Value *RawManagedMem = Builder.CreateCall(MallocManagedFn, {SizeVal});
   Value *Bitcasted = Builder.CreateBitCast(RawManagedMem, Alloca->getType());




More information about the llvm-commits mailing list