OSDN Git Service

Subzero: Simplify the constant pools.
authorJim Stichnoth <stichnot@chromium.org>
Thu, 20 Nov 2014 19:24:42 +0000 (11:24 -0800)
committerJim Stichnoth <stichnot@chromium.org>
Thu, 20 Nov 2014 19:24:42 +0000 (11:24 -0800)
commitd2cb4361c732dcddc98659415f37be45982e20c3
tree53fd15f7d7798a79d26356c518c36189bbabe2ed
parent144a393b4e66077dcad46c3dd4ac12a9d84f5cfe
Subzero: Simplify the constant pools.

Internally, create a separate constant pool for each integer type, instead of a single i64 pool that uses the Ice::Type value as part of the key.  This means each constant pool key can be a simple primitive value, rather than a tuple.

Represent the pools using std::unordered_map instead of std::map since we're using C++11 now.

Use signed integers instead of unsigned integers for the integer constant pools, to benefit from sign extension and to be more consistent.

Remove the SuppressMangling field from hash and comparison functions on RelocatableTuple, since we'll never have two symbols with the same name but different values of SuppressMangling.

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/737513008
src/IceConverter.cpp
src/IceGlobalContext.cpp
src/IceGlobalContext.h
src/IceOperand.cpp
src/IceOperand.h
src/IceTargetLoweringX8632.cpp
src/IceTargetLoweringX8632.h
src/PNaClTranslator.cpp
src/assembler_ia32.cpp
tests_lit/llvm2ice_tests/undef.ll