hi all,
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?
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.
GCC's tree-ssa IR is in fact a collection on representations namely,
GENERIC, low GIMPLE, high GIMPLE etc.. The llvm IR convert may need
modifications if gcc optimization pipeline is enabled.