[LLVMdev] Accessing/Loading a new pass

Chris Lattner sabre at nondot.org
Wed Jul 4 12:17:16 PDT 2007

On Wed, 4 Jul 2007, Ben Chambers wrote:
> Ok.  So I took the source code from 1.5 for the LowerConstantExprs
> pass and (hopefully) corrected all the bitrot.  It now compiles.  But
> opt doesn't see it (when I run Release/bin/opt --help it doesn't show
> up).  So, I copy the Transform/Hello directory and compile it as a
> dynamically loaded pass.  When I run Release/bin/opt -load
> Release/lib/LLVMLowerConstExps --help it shows up.  Ok.  Now I run
> make install.  Now if I run opt -load Release/lib/LLVMLowerConstExps I
> get an error message.  Specifically, I get:

I'd suggest adding it back to the scalar directory.  Then make sure to add 
it to include/llvm/LinkAllPasses.h


> Error opening 'lib/LLVMLowerConst': Can't open :lib/LLVMLowerConst:
> dlopen(lib/LLVMLowerConst.0.dylib, 9): Symbol not found:
> __ZN4llvm12FunctionPass11runOnModuleERNS_6ModuleE
>  Referenced from:
> /Users/benchambers/Documents/research/llvm/llvm-2.0/Release/lib/LLVMLowerConst.0.dylib
>  Expected in: flat namespace
>  -load request ignored.
> What's going?  I'd like to get it to be built into opt (so I'd like to
> figure out why it wasn't showing up when I had it in
> Transforms/Scalar), but lacking that I'd like to figure out how to get
> it to load into opt after I install opt.
> Thanks for your help,
> Ben Chambers
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list