diff options
author | rander <rander.wang@intel.com> | 2017-06-14 13:55:55 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-06-23 16:04:56 +0800 |
commit | 8d3e93fa9286b0000225c6071eca21f60a396dad (patch) | |
tree | c483ff2deb751a28a08ca508b09825e62b6dae73 /include/CL/opencl.h | |
parent | 36f6a8b6b956ffed15d100abe677125d4a5aeaed (diff) |
backend: add global immediate optimization
there are some global immediates in global var list of LLVM.
these imm can be integrated in instructions. for compiler_global_immediate_optimized test
in utest, there are two global immediates:
L0:
MOV(1) %42<0>:UD : 0x0:UD
MOV(1) %43<0>:UD : 0x30:UD
used by:
ADD(16) %49<1>:D : %42<0,1,0>:D %48<8,8,1>:D
ADD(16) %54<1>:D : %43<0,1,0>:D %53<8,8,1>:D
it can be
ADD(16) %49<1>:D : %48<8,8,1>:D 0x0:UD
ADD(16) %54<1>:D : %53<8,8,1>:D 0x30:UD
Then the MOV can be removed. And after this optimization, ADD 0 can be change
to MOV, then local copy propagation can be done.
V2: (1) add environment variable to enable/disable the optimization
(2) refine the architecture of imm optimization, inherit from global
optimizer not local block optimizer
V3: merge with latest master driver
V4: (1)refine some type errors
(2)remove UD/D check for no need
(3)refine imm calculate for UD/D
Signed-off-by: rander.wang <rander.wang@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
Diffstat (limited to 'include/CL/opencl.h')
0 files changed, 0 insertions, 0 deletions