Improving the usability of the type manager. The type manager hashes
authorAlan Baker <alanbaker@google.com>
Fri, 8 Dec 2017 20:33:19 +0000 (15:33 -0500)
committerAlan Baker <alanbaker@google.com>
Mon, 18 Dec 2017 13:20:56 +0000 (08:20 -0500)
commit616908503d747a052022d5f5af86647ec373855f
tree5ebc16501681bf5f0288c7322081084702404a28
parent736103404ec8057c89c34a78d86ca54abb02f937
Improving the usability of the type manager. The type manager hashes
types. This allows the lookup of type declaration ids from arbitrarily
constructed types. Users should be cautious when dealing with non-unique
types (structs and potentially pointers) to get the exact id if
necessary.

* Changed the spec composite constant folder to handle ambiguous composites
* Added functionality to create necessary instructions for a type
* Added ability to remove ids from the type manager
21 files changed:
source/opt/constants.cpp
source/opt/constants.h
source/opt/fold_spec_constant_op_and_composite_pass.cpp
source/opt/fold_spec_constant_op_and_composite_pass.h
source/opt/inline_pass.cpp
source/opt/instruction.cpp
source/opt/instruction.h
source/opt/ir_context.cpp
source/opt/ir_context.h
source/opt/optimizer.cpp
source/opt/passes.h
source/opt/scalar_replacement_pass.cpp
source/opt/set_spec_constant_default_value_pass.cpp
source/opt/strength_reduction_pass.cpp
source/opt/strength_reduction_pass.h
source/opt/type_manager.cpp
source/opt/type_manager.h
source/opt/types.cpp
source/opt/types.h
test/opt/type_manager_test.cpp
test/opt/types_test.cpp