Add a scalarize llvm pass.
authorYang Rong <rong.r.yang@intel.com>
Fri, 17 May 2013 07:11:51 +0000 (15:11 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 17 May 2013 07:41:53 +0000 (15:41 +0800)
commit3849534353cc7d84125b0b83937314bab52f561c
tree2d7b90ce723b6e893e2700591af79a298fc4452b
parentfce9f3eb89eeee3fba2296cad936fac582b1dc9f
Add a scalarize llvm pass.

In previous implementation expand vector ops in GenWrite,
it is hard to optimize. Now, I add new llvm pass to scalarize.
This pass will expand all normal vector ops to scalar ops,
except store/load, image read/write and function's argument.
Add fake ExtractElement/InsertElement instructions to avoid
dead instruction elimination, and unit valueMap hold the
relationship between these fake instructions and real
load/store instructions.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/CMakeLists.txt
backend/src/ir/unit.hpp
backend/src/llvm/llvm_gen_backend.cpp
backend/src/llvm/llvm_gen_backend.hpp
backend/src/llvm/llvm_scalarize.cpp [new file with mode: 0644]
backend/src/llvm/llvm_to_gen.cpp