[LLVMdev] writing a pass

Nicholas Rizzolo rizzolo at cs.uiuc.edu
Wed Jul 9 12:19:01 PDT 2003


On Wed, 9 Jul 2003, Misha Brukman wrote:

> > Also, I don't have a Debug subdirectory like the tutorial said I would - I
> > have Release instead.
>
> 1. What version of LLVM are you using (i.e., when did you get a tarball,
>    or if you are using anonymous CVS, are you up to date)?

I use CVS and I updated a couple days ago.

> 3. If you are using a version of LLVM that is new enough to have a
>    'configure' script in the top-level directory, how did you run
>    'configure'? You may have specified './configure --enable-optimized'
>    or the like, with the save effects as in #2.

Yes, that's it.  I should probably disable optimized builds for now
anyway.

> I'm assuming that the file `hello.so' does in fact exist.

Not that I saw.  'libhello.so' does exist though.  It's a link to
'libhello.so.0.0.0' in the same directory.  Also, 'libhello.so.0' in the
same directory is a link to 'libhello.so.0.0.0'.  There is also
'libhello.a', 'libhello.la', and 'hello.o'.

> Did you register your optimization pass with OPT by using something
> along the lines of
>
>   RegisterOpt<Hello> X("hello", "Hello World Pass");
>
> as is mentioned in the `Basic code required' section?

I used lib/Transforms/Hello/Hello.cpp provided in the CVS tree.  It has
exactly the line of code you require.  I also used the Makefile there.

If you think of anything else, please let me know...
 - Nick





More information about the llvm-dev mailing list