[LLVMdev] function and stack size constants

Charlie Curtsinger charlie at cs.umass.edu
Thu May 20 11:12:22 PDT 2010


I'm looking to add a ConstantArray of function and stack sizes to a module in an opt pass, but obviously these values aren't available until code generation.  As far as I can tell, the only way to go about this would be to add two new constants, FunctionSize and StackSize, both taking a function as a parameter and then lower these somewhere in the target-specific code.  Does this sound reasonable?  I'm not sure where to start with the creation of these constants.

Any pointers on adding the constants or an alternative approach would be greatly appreciated.

Thanks,
 - Charlie



More information about the llvm-dev mailing list