[llvm-commits] [llvm] r133285 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
Duncan Sands
baldrick at free.fr
Tue Jun 21 13:35:41 PDT 2011
Hi John,
> I was suggesting that we could make more aggressive restrictions on the
> size input to alloca based on a basic assumption that you can't grow your stack
> to>2GB, even on>32-bit architectures. But if we want to support that, then
> obviously this needs to be based on the pointer width.
I agree.
>> Why? Are you saying that an alloca of 2^31 i8's should be considered to result
>> in undefined behaviour?
>
> On a 32-bit machine, yes. Are you really saying that we need to
> support any argument to alloca that's smaller than the addressable
> space of the machine?
>
> If so, this transformation is completely dead; feel free to remove it.
>
>> And what about this: alloca i8, i8 128
>
> I did say "in sizeof(sp)" above.
I didn't know what you meant by sizeof(sp), so I just ignored that bit :)
For what it's worth I agree it should be fine to assume that the stack always
consumes less than half of the address space.
Ciao, Duncan.
More information about the llvm-commits
mailing list