[LLVMdev] Registering a MachineFunctionPass from a Clang plugin

Jan Hoogerbrugge jan.hoogerbrugge at gmail.com
Thu Apr 24 03:47:14 PDT 2014


Hi,

I am using this code to register a llvm IR pass from a Clang plugin:

void registerPasses(const PassManagerBuilder &PMB, PassManagerBase &PM)
{
  PM.add(...);
}

RegisterStandardPasses register_pass(PassManagerBuilder::EP_OptimizerLast,
registerPasses);

I would like to do the same for registering a MachineFunctionPass pass. Any
idea how to do this?
Perhaps it is also fine to register the machine pass from an IR pass. If
so, how?

Regards,
Jan Hoogerbrugge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140424/c43a70aa/attachment.html>


More information about the llvm-dev mailing list