[LLVMdev] Do all user-written passes have to be run through a PassManager object (called from outside the LLVM infrastructure)?

John Criswell criswell at illinois.edu
Thu Jan 16 11:29:42 PST 2014


On 1/16/14 11:44 AM, Gai, Jiading wrote:
> I have written several passes that have no pre-requisites for any
> previous LLVM native passes prior to my own. For those passes, I have verified that at
> least the following two approaches are equivalent in terms of executing
> those self-written passes and getting the correct results:

I don't know if you *must* run all passes via a PassManager, but I think 
you should.  That's how passes are designed to work, and running them 
through a PassManager provides some future-proofing benefits (e.g., if 
you add a prerequisite analysis pass to one of your passes, it will 
"just work").

-- John T.




More information about the llvm-dev mailing list