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 .

This commit is contained in:
Tomas Lindquist Olsen
2009-05-14 13:26:40 +02:00
parent 5694ec18ff
commit f5d635dfc7
16 changed files with 61 additions and 44 deletions

View File

@@ -98,7 +98,7 @@ namespace {
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 @@ namespace {
// 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.