Nicole Irwanto wrote:> Hi!!
>
> This is my first time with llvm. I'm still learning and really need
help.
>
> I wrote only one Function Pass, which uses another Function Pass
(blockNrs), and registered this:
> RegisterPass<FunctionAnalysis> X("gasched", "Genom
Scheduling Pass");
>
> When I compile my sourcecode, everything was okay. But when I tried to test
it, i got this error Message:
>
> nicole at fpga3:~/test$ make
> opt -load /iss/fpga3/nicole/llvm-2.2/Debug/lib/LLVMblockNrs.so -load
/iss/fpga3/nicole/llvm-2.2/Debug/lib/libgascheduling.so -help < opt.bc
>/dev/null
> Two passes with the same argument (-gasched) attempted to be registered!
>
1) Have you ensured that your passes have different arguments to the
RegisterPass constructor (i.e., they have different names)?
2) Are you sure that variable X is only being defined once? There are
some ways in which you could have unintentionally defined it twice. For
example, if you put the RegisterPass line in a header file that is
included by multiple source files in your pass's source code, it will be
defined multiple times, possibly giving rise to this error. In our
code, we use RegisterPass inside a single .cpp file to ensure it's only
defined once.
-- John T.
> /bin/sh: line 1: 15334 Abgebrochen opt -load
/iss/fpga3/nicole/llvm-2.2/Debug/lib/LLVMblockNrs.so -load
/iss/fpga3/nicole/llvm-2.2/Debug/lib/libgascheduling.so -help <opt.bc
>/dev/null
> make: *** [opt] Fehler 134
>
> Can you please help me. I don't understand what I have made wrong. The
Makefile for the test is written like this:
>
> all: opt test.ll opt.ll
>
> opt: opt.bc
> opt -load /iss/fpga3/nicole/llvm-2.2/Debug/lib/LLVMblockNrs.so
-load /iss/fpga3/nicole/llvm-2.2/Debug/lib/libgascheduling.so -help < opt.bc$
>
> opt.ll: opt.bc
> llvm-dis opt.bc -f -o opt.ll
>
> opt.bc: test.bc
> opt -verify -mem2reg -prune-eh -verify <test.bc >opt.bc
>
> test.ll: opt.bc
> llvm-dis test.bc -f -o test.ll
>
> test.bc: test.c
> llvm-gcc -c -emit-llvm test.c -o test.bc
>
>
> Thank you for your help.
>
> cheers,
> Nicole
>
>
>
> _______________________________________________________________________
> EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
> Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid at mf2
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>