[LLVMdev] How do I get MachineFunctions?
jtcriswel at gmail.com
Thu Oct 16 06:17:09 PDT 2014
You need to write a MachineFunctionPass instead of a ModulePass or
FunctionPass. A MachineFunctionPass is given a MachineFunction to
analyze/transform in its runOnFunction() method.
MachineFunctionPass'es are run by llc and other LLVM-based tools that
generate native code (such as the libLTO plugin and Clang).
On 10/14/14, 4:52 PM, Vanderson Martins do Rosario wrote:
> Hi everybody,
> I know that this may be a very silly question, but seriously, I'm
> totally lost.
> So, what I want to know is how from my Module I can get
> MachineFunctions or MachineBasicBlocks.
> I'm able to read a file with LLVM IR, create the Module and I also
> managed to create some passes for it, but what I want is to see the
> x86-64 assembly that this IR generates and map MachineBasicBlocks with
> I know that I should follow the Instruction Selection steps from
> but I couldn't figure it out how to do this. I also tried to read the
> llc's code, but it didn't help me so much.
> I would be grateful if somebody show me an example of how from a
> Module I can get MachineBasicBlocks.
> Thank you,
> Vanderson M. Rosario
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
Department of Computer Science, University of Rochester
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev