Yang, Cheng-Chih
2014-Sep-30 15:05 UTC
[LLVMdev] Custom pass that runs before EmitStartOfAsmFile()?
Hi all, I'm trying to write a custom module-level pass that runs before AsmPrinter::EmitStartOfAsmFile(), since I'd like to have some processed information available once entering this function. Looking through "Writing an LLVM pass" documentation, it's not clear to me if this is possible. I've also tried putting the pass in different orders (addPreISel, addIRPasses, and etc.). Am I missing something or this is just not possible to do? Any help is appreciated. Thanks, Cheng-Chih -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140930/78e83ad1/attachment.html>
Jeroen Dobbelaere
2014-Sep-30 19:37 UTC
[LLVMdev] Custom pass that runs before EmitStartOfAsmFile()?
Hi Cheng-Chih, You can add custom passes right before code emit by implementing the 'addPreEmitPass()' function of your target pass config. An example of this can be found here: <http://llvm.org/docs/doxygen/html/XCoreTargetMachine_8cpp_source.html> Greetings, Jeroen Dobbelaere From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Yang, Cheng-Chih Sent: Tuesday, September 30, 2014 5:06 PM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Custom pass that runs before EmitStartOfAsmFile()? Hi all, I'm trying to write a custom module-level pass that runs before AsmPrinter::EmitStartOfAsmFile(), since I'd like to have some processed information available once entering this function. Looking through "Writing an LLVM pass" documentation, it's not clear to me if this is possible. I've also tried putting the pass in different orders (addPreISel, addIRPasses, and etc.). Am I missing something or this is just not possible to do? Any help is appreciated. Thanks, Cheng-Chih -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140930/998f8577/attachment.html>
Yang, Cheng-Chih
2014-Sep-30 21:35 UTC
[LLVMdev] Custom pass that runs before EmitStartOfAsmFile()?
Thanks Jeroen. Unfortunately that does not solve my problem. It still appears that EmitStartOfAsmFile runs before that. Thanks, Cheng-Chih From: Jeroen Dobbelaere [mailto:Jeroen.Dobbelaere at synopsys.com] Sent: Tuesday, September 30, 2014 3:37 PM To: Yang, Cheng-Chih; llvmdev at cs.uiuc.edu Subject: RE: Custom pass that runs before EmitStartOfAsmFile()? Hi Cheng-Chih, You can add custom passes right before code emit by implementing the 'addPreEmitPass()' function of your target pass config. An example of this can be found here: <http://llvm.org/docs/doxygen/html/XCoreTargetMachine_8cpp_source.html> Greetings, Jeroen Dobbelaere From: llvmdev-bounces at cs.uiuc.edu<mailto:llvmdev-bounces at cs.uiuc.edu> [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Yang, Cheng-Chih Sent: Tuesday, September 30, 2014 5:06 PM To: llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu> Subject: [LLVMdev] Custom pass that runs before EmitStartOfAsmFile()? Hi all, I'm trying to write a custom module-level pass that runs before AsmPrinter::EmitStartOfAsmFile(), since I'd like to have some processed information available once entering this function. Looking through "Writing an LLVM pass" documentation, it's not clear to me if this is possible. I've also tried putting the pass in different orders (addPreISel, addIRPasses, and etc.). Am I missing something or this is just not possible to do? Any help is appreciated. Thanks, Cheng-Chih -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140930/9186aefd/attachment.html>
Possibly Parallel Threads
- [LLVMdev] MachineRegisterInfo use_iterator/reg_iterator?
- [LLVMdev] MachineRegisterInfo use_iterator/reg_iterator?
- [LLVMdev] Default/initial values for function arguments?
- [LLVMdev] Questions on ARMInstrInfo.td and MC/ARM/ELF
- [LLVMdev] How to associate extra comments to a MachineInstruction ?