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

@@ -77,7 +77,7 @@ void DtoArrayInit(Loc& loc, DValue* array, DValue* value)
// give slices and complex values storage (and thus an address to pass)
if (value->isSlice())
{
val = DtoAlloca(DtoType(value->getType()), ".tmpparam");
val = DtoAlloca(value->getType(), ".tmpparam");
DVarValue lval(value->getType(), val);
DtoAssign(loc, &lval, value);
}
@@ -448,7 +448,7 @@ DSliceValue* DtoNewMulDimDynArray(Loc& loc, Type* arrayType, DValue** dims, size
LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, fnname);
// build dims
LLValue* dimsArg = DtoAlloca(DtoSize_t(), DtoConstUint(ndims), ".newdims");
LLValue* dimsArg = DtoArrayAlloca(Type::tsize_t, ndims, ".newdims");
LLValue* firstDim = NULL;
for (size_t i=0; i<ndims; ++i)
{