On 7/25/05, Reid Spencer <reid at x10sys.com>
wrote:> 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.
OK, that makes sense.
> 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.
Oh, I was a little confused, then - I thought llc actually was llvmc.
> Why not just create your pass as a shared object and:
>
> opt -load mypass.so -mypass | llc
My pass is an implementation of an analysis group that I wanted to
make available to machine passes as well as optimization passes. So I
really do want it in llc, not just its output.
I could easily change my llc to just load my pass, I just wanted to
check if there was a better way first. Specifically, should I dive
into llvmc and help flush out bugs? (how unfinished is it?)
Thanks,
-mike
> 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
> >
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQBC5bwB3J9yEj6nvGcRAqWkAJwOTMMmIon6jnXJjzadIKU7wefyGgCfdAg/
> OEdCG5PnRYdlMiLkcuD+ZV0> =USOS
> -----END PGP SIGNATURE-----
>
>
>
--
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/blog/