[LLVMdev] Enumerating machine functions

Lorenzo De Carli lorenzo at cs.wisc.edu
Fri Apr 1 13:32:14 PDT 2011


I have a doubt about running passes on machine code. We are
implementing a transformation on machine code that consists in
analyzing a series of functions, extracting some aggregate properties,
and then using the extracted information to optimize each functions.

I am not familiar with LLVM internals, so I am not sure how to
implement each step. From the documentation, it seems that the only
way to work on the machine-dependent representation is to write a
MachineFunctionPass. However, such pass would be run separately on
every function, while what we need is pretty much a ModulePass running
on machine code, or some way to enumerate all the MachineFunction
objects. Is there any way to achieve this?


More information about the llvm-dev mailing list