[PATCH] A new HeapToStack allocation promotion pass

Hal Finkel hfinkel at anl.gov
Mon Sep 23 18:29:37 PDT 2013

Yes, I think that we'd like to thread some enabling flag (as well as the thresholds) through as PassManagerBuilder options. Regarding kernel builds, don't then use -fno-builtins anyway? That would disable this transformation as well.


----- Original Message -----
>   Does there need to be special frontend logic to keep this out of
>   e.g. kernel builds? Kernel code typically is running on a very
>   small stack and deliberately calls malloc/kalloc/whatever even for
>   a value that is live for a single block. Replacing those calls
>   with stack allocation might result in some nasty kernel panic
>   debugging for some poor soul.
> http://llvm-reviews.chandlerc.com/D1745

Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory

More information about the llvm-commits mailing list