[LLVMdev] pass position
Anshu Dasgupta
anshuman at cs.rice.edu
Wed Dec 17 13:54:01 PST 2003
> I can run that pass through opt on the bytecode emitted by gcc frontend
> through opt tool. However, I want that Pass1 to be the part of the
> actual GCC compiler. I want to know how I can position Pass1 among
> other passes /optimizations/ code generations.
I had a similar question and Chris recommended that I edit the
addPassesToEmitAssembly method. Quoting him:
" Basically, if you want to work on the code generator, this is what you
should do: Add your pass to the addPassesToEmitAssembly method for the
target of your choice, and in your pass implement the getPassName()
method to provide a nice user-friendly name. "
You can explicitly specify where (w.r.t other passes) your pass will
execute in the addPassesToEmitAssembly method.
-Anshu
More information about the llvm-dev
mailing list