Mercurial > projects > ldc
diff gen/passes/GarbageCollect2Stack.cpp @ 1350:15e9762bb620
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 14 May 2009 13:26:40 +0200 |
parents | 3297edb697eb |
children | 67ac63740c7f |
line wrap: on
line diff
--- a/gen/passes/GarbageCollect2Stack.cpp Wed May 13 18:08:40 2009 +0200 +++ b/gen/passes/GarbageCollect2Stack.cpp Thu May 14 13:26:40 2009 +0200 @@ -98,7 +98,7 @@ NumGcToStack++; Instruction* Begin = CS.getCaller()->getEntryBlock().begin(); - return new AllocaInst(Ty, ".nongc_mem", Begin); + return new AllocaInst(Ty, ".nongc_mem", Begin); // FIXME: align? } FunctionInfo(unsigned typeInfoArgNr, bool safeToDelete) @@ -165,7 +165,7 @@ // Convert array size to 32 bits if necessary Value* count = Builder.CreateIntCast(arrSize, Type::Int32Ty, false); - AllocaInst* alloca = Builder.CreateAlloca(Ty, count, ".nongc_mem"); + AllocaInst* alloca = Builder.CreateAlloca(Ty, count, ".nongc_mem"); // FIXME: align? if (Initialized) { // For now, only zero-init is supported.