[LLVMdev] making trampolines more portable

Eric Smith eric at brouhaha.com
Sat Jun 13 18:59:18 PDT 2009

I'm not sure whether there are any other cases where using LLVM requires 
knowledge of the target architecture, but needing it for trampolines is 
worrying me.  I'm putting together things where the program that's 
generating the LLVM intermediate code doesn't have any way to know what 
the target architecture will be.

Right now I'm using alloca to get a block that is expected to be more 
than large enough, and assuming that align 4 will work.  Any chance of 
LLVM gaining a new intrinsic that returns the appropriate size and 
alignment for the target?  (Might need the alloca() instruction extended 
or a new version to support non-constant alignment?)


More information about the llvm-dev mailing list