[LLVMdev] Available code-generation parallism

Nicolas Geoffray nicolas.geoffray at lip6.fr
Fri Nov 7 06:05:39 PST 2008

Jonathan Brandmeyer wrote:
> What about lazy unification of uniqued values after IR construction?  If
> that pass is performed on a per-module basis, then all of the Modules
> will be isolated in memory from each other.  The front-end can partition
> its source into N modules in whatever way it sees fit.  Then it can
> instantiate a PassManager and Module per thread and build the IR into
> them.  That isn't quite as nice as taking advantage of per-function
> parallelism where the individual passes allow it, but it would be a step
> in the right direction.

Going further, why should it be per-module? We could let the front-end 
decide if uniqued values like constants, types, ... are per-function, 
per-module or global.

When using LLVM as a JIT (eg vmkit),  the nice thing if it's 
per-function is that we can delete all constants a function uses after 
JIT code generation. For example, I've noticed that 5M are used only for 
constants when running vmkit with a large application (eg Tomcat). I 
surely would like these 5M to be deleted when JIT code generation is 


More information about the llvm-dev mailing list