[LLVMdev] is it possible to use gcc vectorizer ?
Duncan Sands
baldrick at free.fr
Tue Mar 16 03:01:23 PDT 2010
Hi Kuan-Hsu,
> gcc provides auto-vectorization on the tree-ssa framework, and llvm-gcc
> uses tree-ssa to generate LLVM IR.
> so, is it possible to use gcc vectorizer in LLVM?
in theory yes, but you would have to modify the compiler. In llvm-gcc all
gcc optimizers are turned off, and this includes the vectorizer (see the
#ifdef ENABLE_LLVM clauses in gcc/passes.c), so you would have to reenable
them. This might cause problems due to potential bad interactions between
the gcc optimizers and LLVM modifications to the compiler - I don't know.
Ciao,
Duncan.
PS: In case anyone is wondering, this is not possible with the dragonegg
plugin, which is a pity since the auto-vectorizer is much improved in gcc-4.5
I hear. The reason is that gimple->IR conversion replaces gcc's LTO logic,
and this runs before the auto-vectorizer.
More information about the llvm-dev
mailing list