On Jan 25, 2008, at 8:37 AM, Duncan Sands wrote: >>> PS: Does an alignment of 0 mean the ABI alignment or the preferred >>> alignment? I'm guessing that it means ABI for globals and >>> preferred for allocas. >> >> In what context? > > In any context :) Basically I'm asking what it means if you pass an > alignment of 0 for an alloca (or a global). For example, llvm-gcc > uses alignment 0 for an alloca if the ABI alignment equals the gcc > alignment. But if the alloca gets the preferred alignment in the > end (at codegen time) and this differs from the ABI alignment, then > this would be wrong.
It looks like selectiondagisel is using the max(requested alignment, preferred alignment) for the type for allocas. This makes sense. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits