[LLVMdev] machine pass

Villmow, Micah Micah.Villmow at amd.com
Wed Apr 28 19:35:48 PDT 2010


Dan,
 Please look at llvm\lib\Target\X86\X86FloatingPointRegKill.cpp as an example on how to write a Machine pass.

In the backend that you want to add the pass to, modify the <X>TargetMachine.cpp file and add the pass to addPreEmitPass()

Micah

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of dan mihai
Sent: Wednesday, April 28, 2010 2:47 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] machine pass

Hi,

LLVM documentation is not clear. Is it possible to write a machine pass?
I am trying to insert some machine code before the return instruction.
ideally, I'd like a pass that runs the last one before generating assembly.
How can this be done?

Thank you,
Dan

________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100428/36c081f1/attachment.html>


More information about the llvm-dev mailing list