GBE: optimize unaligned char and short data vector's load.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 27 Aug 2014 03:13:15 +0000 (11:13 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 3 Sep 2014 04:30:18 +0000 (12:30 +0800)
commit26fe863701eae975959eade65e87921667b34360
tree4199fa79c805ddb5c0c48f85ccc3df4f9c6d034f
parent44929d4847b7b5d0cf5929a3155b6193091c26b7
GBE: optimize unaligned char and short data vector's load.

The gather the contiguous short/char loads into a single load instruction
could give us a good pportunity to use untyped load to optimize them.

This patch enable the short/char load gathering at the load store optimize
pass. Then at the backend, it will load corresponding DWORDs then covert to
short/char accordingly by applying shift and bitwise operations.

The benchmark shows, for vload4/8/16 char or vload/2/4/8/16 short, this patch brings
about 80%-100% improvement.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_insn_selection.cpp
backend/src/llvm/llvm_gen_backend.cpp
backend/src/llvm/llvm_loadstore_optimization.cpp