Allow pointers to pointers in logical addressing mode.
authorSteven Perron <stevenperron@google.com>
Mon, 11 Dec 2017 18:10:24 +0000 (13:10 -0500)
committerSteven Perron <stevenperron@google.com>
Tue, 19 Dec 2017 19:29:14 +0000 (14:29 -0500)
commit79a00649b4fdcbbbaeb47f0081e28ea40c886f0a
treed0f2df0de862f1b970de2bd41758fdd81a30520e
parentb86eb6842b4d95860828c58fd6f44a91801334be
Allow pointers to pointers in logical addressing mode.

A few optimizations are updates to handle code that is suppose to be
using the logical addressing mode, but still has variables that contain
pointers as long as the pointer are to opaque objects.  This is called
"relaxed logical addressing".

|Instruction::GetBaseAddress| will check that pointers that are use meet
the relaxed logical addressing rules.  Optimization that now handle
relaxed logical addressing instead of logical addressing are:

 - aggressive dead-code elimination
 - local access chain convert
 - local store elimination passes.
17 files changed:
include/spirv-tools/optimizer.hpp
source/opcode.cpp
source/opcode.h
source/opt/aggressive_dead_code_elim_pass.cpp
source/opt/aggressive_dead_code_elim_pass.h
source/opt/instruction.cpp
source/opt/instruction.h
source/opt/local_single_block_elim_pass.cpp
source/opt/local_single_store_elim_pass.cpp
source/opt/local_ssa_elim_pass.cpp
source/opt/mem_pass.cpp
source/opt/mem_pass.h
test/opt/aggressive_dead_code_elim_test.cpp
test/opt/instruction_test.cpp
test/opt/local_single_block_elim.cpp
test/opt/local_single_store_elim_test.cpp
test/opt/local_ssa_elim_test.cpp