[LLVMdev] dragonegg polly support broken?
Tobias Grosser
tobias at grosser.es
Sun Oct 21 08:38:21 PDT 2012
On 10/20/2012 05:38 PM, Jack Howarth wrote:
> Duncan,
> Is the documentation for using Polly support in dragonegg correct? I built llvm/polly/dragonegg
> using the documentation at http://polly.llvm.org/example_load_Polly_into_dragonegg.html
> with...
>
> GCC=/sw/lib/gcc4.7/bin/gcc-4 LLVM_CONFIG=/sw/opt/llvm-3.2/bin/llvm-config ENABLE_LLVM_PLUGINS=1 make CPPFLAGS="-DENABLE_LTO -I/sw/include"
>
> The resulting dragonegg plugin works fine as...
>
> /sw/lib/gcc4.7/bin/gcc-4 -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so -O3 himenoBMTxpa.c
>
> but if I try to invoke polly with...
>
> /sw/lib/gcc4.7/bin/gcc-4 -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so -O3 -fplugin-arg-dragonegg-llvm-option=load:/sw/opt/llvm-3.2/lib/LLVMPolly.dylib himenoBMTxpa.c
>
>
> I get the error...
>
> cc1: Unknown command line argument 'load=/sw/opt/llvm-3.2/lib/LLVMPolly.dylib'. Try: 'cc1 -help'
I think the website is wrong. You probably need to add a '-' before the
'load'. See the following:
"-fplugin-arg-dragonegg-llvm-option=-load:/sw/opt/llvm-3.2/lib/LLVMPolly.dylib"
Please let me know if this works, such that I can update the website.
>
> Clang gets a little further with...
>
> clang -Xclang -load -Xclang /sw/opt/llvm-3.2/lib/LLVMPolly.dylib -O3 -mllvm -polly himenoBMTxpa.c
> error: unable to load plugin '/sw/opt/llvm-3.2/lib/LLVMPolly.dylib': 'dlopen(/sw/opt/llvm-3.2/lib/LLVMPolly.dylib, 9): Symbol not found:
> __ZN4llvm10DataLayout2IDE
> Referenced from: /sw/opt/llvm-3.2/lib/LLVMPolly.dylib
> Expected in: flat namespace
> in /sw/opt/llvm-3.2/lib/LLVMPolly.dylib'
> clang (LLVM option parsing): Unknown command line argument '-polly'. Try: 'clang (LLVM option parsing) -help'
> clang (LLVM option parsing): Did you mean '-help'?
>
> This is with llvm/clang/compiler-rt/polly/dragonegg all from svn 166382.
As you realized yourself, Polly and clang need to be in sync. Otherwise
incompatible symbols cause problems.
Tobi
More information about the llvm-dev
mailing list