AnsweredAssumed Answered

Errors while compiling with -mllvm

Question asked by afernandezody on Mar 30, 2020
Latest reply on Aug 13, 2020 by ravitejak07

Hello AMD gurus,
I'm following the AOCC user guide to configure an EPYC-2 server with Ubuntu 18.04. My question is about flags as using target selection, code generation and the 1st group of optimization flags. The issues arise when I try to use the 'mllvm' group. When I throw everything (-O3 -ffast-math -march=znver2 -mllvm -agressive-loop-unswitch -enable-strided-vectorization -enable-epilog-vectorization -vectorize-memory-aggressively -enable-redundant-movs -merge-contant -function-specialize -lv-function-specialization -enable-vectorize-compares -inline-recursion -reduce-array-computations=3 -global-vectorize-slp -region-vectorize -nt-store-aggressive -enable-X86-prefetching -suppress-fmas), I get the error:

clang-9: error: clang-9: error: unknown argument: '-vectorize-memory-aggressively'
unknown argument: '-vectorize-memory-aggressively'
clang-9: error: unknown argument: '-merge-contant'
clang-9: error: unknown argument: '-merge-contant'
clang-9: error: unknown argument: '-function-specialize'
clang-9: error: unknown argument: '-function-specialize'
clang-9: error: unknown argument: '-inline-recursion'
clang-9: error: unknown argument: '-inline-recursion'
clang-9: error: unknown argument: '-reduce-array-computations=3'
clang-9: error: unknown argument: '-reduce-array-computations=3'
clang-9: error: unknown argument: '-global-vectorize-slp'
clang-9: error: unknown argument: '-global-vectorize-slp'
clang-9: error: unknown argument: '-region-vectorize'
clang-9: error: unknown argument: '-region-vectorize'
clang-9: error: unknown argument: '-nt-store-aggressive'
clang-9: error: unknown argument: '-nt-store-aggressive'
clang-9: error: unknown argument: '-suppress-fmas'
clang-9: error: unknown argument: '-suppress-fmas'
clang-9clang-9: warning: -lv-function-specialization: 'linker' input unused [-Wunused-command-line-argument]
: warning: -lv-function-specialization: 'linker' input unused [-Wunused-command-line-argument]
<builtin>: recipe for target 'src/main.o' failed
make: *** [src/main.o] Error 1
make: *** Waiting for unfinished jobs....
<builtin>: recipe for target 'src/CG.o' failed
make: *** [src/CG.o] Error 1

If I'm a bit more surgical and remove some of flags causing trouble (-O3 -ffast-math -march=znver2 -mllvm -agressive-loop-unswitch -enable-strided-vectorization -enable-epilog-vectorization -enable-redundant-movs -lv-function-specialization -enable-vectorize-compares -enable-X86-prefetching), I'm still getting the following errors

 

clang-9: warning: -lv-function-specialization: 'linker' input unused [-Wunused-command-line-argument]
clang-9: warning: -lv-function-specialization: 'linker' input unused [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-strided-vectorization' [-Wunused-command-line-argument]clang-9: warning: argument unused during compilation: '-e nable-strided-vectorization' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-epilog-vectorization' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-redundant-movs' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-vectorize-compares' [-Wunused-command-line-argument]
clang-9
clang-9: warning: argument unused during compilation: '-e nable-epilog-vectorization' [-Wunused-command-line-argument]
clang-9: : warning: argument unused during compilation: '-e nable-redundant-movs' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-vectorize-compares' [-Wunused-command-line-argument]
clang-9: warning: argument unused during compilation: '-e nable-X86-prefetching' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-e nable-X86-prefetching' [-Wunused-command-line-argument]
clang (LLVM option parsing)clang (LLVM option parsing): Unknown command line argument ': Unknown command line argument '-agressive-loop-unswitch'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing)-agressive-loop-unswitch'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '  --aggressive-loop-unswitch'?
: Did you mean '  --aggressive-loop-unswitch'?
<builtin>: recipe for target 'src/main.o' failed
make: *** [src/main.o] Error 1
make: *** Waiting for unfinished jobs....
<builtin>: recipe for target 'src/CG.o' failed
make: *** [src/CG.o] Error 1

 

I'm unsure if there is something wrong or if all these flags should be invoked in a different fashion.
Thanks.

Outcomes