Store all enabled capabilities in the feature manger.
authorSteven Perron <stevenperron@google.com>
Tue, 19 Dec 2017 19:18:13 +0000 (14:18 -0500)
committerDavid Neto <dneto@google.com>
Thu, 21 Dec 2017 16:14:53 +0000 (11:14 -0500)
commit756b277fb826675f0356995f975bd7da1cacc23d
treee3d1d7f40936760dbb8bcc7e7c2cb00e79442597
parent8e0051c78188371293377b0cac482c6f366a9813
Store all enabled capabilities in the feature manger.

In order to keep track of all of the implicit capabilities as well as
the explicit ones, we will add them all to the feature manager.  That is
the object that needs to be queried when checking if a capability is
enabled.

The name of the "HasCapability" function in the module was changed to
make it more obvious that it does not check for implied capabilities.

Keep an spv_context and AssemblyGrammar in IRContext
25 files changed:
source/link/linker.cpp
source/opt/aggressive_dead_code_elim_pass.cpp
source/opt/build_module.cpp
source/opt/cfg.cpp
source/opt/common_uniform_elim_pass.cpp
source/opt/dead_branch_elim_pass.cpp
source/opt/feature_manager.cpp
source/opt/feature_manager.h
source/opt/inline_pass.cpp
source/opt/instruction.cpp
source/opt/ir_context.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/merge_return_pass.cpp
source/opt/module.cpp
source/opt/module.h
source/opt/private_to_local_pass.cpp
test/opt/decoration_manager_test.cpp
test/opt/def_use_test.cpp
test/opt/feature_manager_test.cpp
test/opt/instruction_test.cpp
test/opt/ir_context_test.cpp
test/opt/pass_manager_test.cpp