[LLVMdev] Making a pass available to llc?

Reid Spencer reid at x10sys.com
Mon Jul 25 21:28:49 PDT 2005


I think that the answer is that llc is intended to be the final compiler
of executable output. Running "general" passes in llc was never part of
the design. It just runs machine passes, assuming that its bytecode
input is already optimized. What you're looking for is a program that is
the combination of opt and llc. Eventually, the llvmc program intends to
be that program. It currently runs most of the passes run by gccld and
also provides a -load option to allow extension of pass sets. However,
llvmc is an unfinished work and a bit more cumbersome to use.

Why not just create your pass as a shared object and:

opt -load mypass.so -mypass | llc 

?
Reid.

On Mon, 2005-07-25 at 19:07 -0700, Michael McCracken wrote:
> Hi - I wanted to make a pass available for use with llc, and found
> that even though there is a PassInfo::LLC value, it isn't currently
> used.
> 
> If you compare analyze.cpp and opt.cpp to llc.cpp, the first two find
> appropriate pass names with a FilteredPassNameParser and create them,
> but llc does not - it just gets all the passes it wants through the
> TargetMachine.
> 
> Is there a particular reason not to create general Passes from llc?
> 
> Thanks,
> mike
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050725/635e1b75/attachment.sig>


More information about the llvm-dev mailing list