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? -- Best regards Kuan-Hsu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100316/884b5cc3/attachment.html>
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.
On Tue, Mar 16, 2010 at 3:01 AM, Duncan Sands <baldrick at free.fr> wrote:> 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.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. - Devang> > 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. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- - Devang
Reasonably Related Threads
- [LLVMdev] is it possible to use gcc vectorizer ?
- [LLVMdev] MI scheduler produce badly code with inline function
- [LLVMdev] MI scheduler produce badly code with inline function
- [LLVMdev] MI scheduler produce badly code with inline function
- Encode target-abi into LLVM bitcode for LTO.