Remove register index/code indirection
authordanno <danno@chromium.org>
Thu, 24 Sep 2015 12:52:54 +0000 (05:52 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 24 Sep 2015 12:53:13 +0000 (12:53 +0000)
commit80bc6f6e11f79524e3f1ad05579583adfd5f18b2
tree6d85293fcc0ccaeb4b691195482345be1d77eabb
parent5c35f5e302994e5dde6a76bcb5823a1cd5a42ed2
Remove register index/code indirection

Previous to this patch, both the lithium and TurboFan register
allocators tracked allocated registers by "indices", rather than
the register codes used elsewhere in the runtime. This patch
ensures that codes are used everywhere, and in the process cleans
up a bunch of redundant code and adds more structure to how the
set of allocatable registers is defined.

Some highlights of changes:

* TurboFan's RegisterConfiguration class moved to V8's top level
  so that it can be shared with Crankshaft.
* Various "ToAllocationIndex" and related methods removed.
* Code that can be easily shared between Register classes on
  different platforms is now shared.
* The list of allocatable registers on each platform is declared
  as a list rather than implicitly via the register index <->
  code mapping.

Review URL: https://codereview.chromium.org/1287383003

Cr-Commit-Position: refs/heads/master@{#30913}
93 files changed:
BUILD.gn
src/arm/assembler-arm-inl.h
src/arm/assembler-arm.cc
src/arm/assembler-arm.h
src/arm/constants-arm.cc
src/arm/deoptimizer-arm.cc
src/arm/disasm-arm.cc
src/arm/lithium-arm.cc
src/arm/lithium-codegen-arm.cc
src/arm/macro-assembler-arm.cc
src/arm/macro-assembler-arm.h
src/arm/simulator-arm.cc
src/arm64/assembler-arm64.cc
src/arm64/assembler-arm64.h
src/arm64/constants-arm64.h
src/arm64/deoptimizer-arm64.cc
src/arm64/lithium-arm64.cc
src/arm64/lithium-codegen-arm64.cc
src/arm64/macro-assembler-arm64.cc
src/arm64/simulator-arm64.h
src/arm64/utils-arm64.h
src/assembler.cc
src/assembler.h
src/compiler/c-linkage.cc
src/compiler/code-generator-impl.h
src/compiler/code-generator.cc
src/compiler/graph-visualizer.cc
src/compiler/instruction-selector-impl.h
src/compiler/instruction.cc
src/compiler/instruction.h
src/compiler/linkage.cc
src/compiler/pipeline.cc
src/compiler/pipeline.h
src/compiler/register-allocator-verifier.cc
src/compiler/register-allocator.cc
src/compiler/register-allocator.h
src/compiler/register-configuration.cc [deleted file]
src/compiler/register-configuration.h [deleted file]
src/deoptimizer.cc
src/frames.cc
src/hydrogen.cc
src/ia32/assembler-ia32.h
src/ia32/code-stubs-ia32.h
src/ia32/deoptimizer-ia32.cc
src/ia32/lithium-codegen-ia32.cc
src/ia32/lithium-gap-resolver-ia32.cc
src/ia32/lithium-gap-resolver-ia32.h
src/ia32/lithium-ia32.cc
src/ia32/macro-assembler-ia32.h
src/lithium-allocator.cc
src/lithium-allocator.h
src/lithium.cc
src/mips/assembler-mips-inl.h
src/mips/assembler-mips.cc
src/mips/assembler-mips.h
src/mips/deoptimizer-mips.cc
src/mips/lithium-codegen-mips.cc
src/mips/lithium-mips.cc
src/mips/macro-assembler-mips.cc
src/mips/macro-assembler-mips.h
src/mips64/assembler-mips64-inl.h
src/mips64/assembler-mips64.cc
src/mips64/assembler-mips64.h
src/mips64/deoptimizer-mips64.cc
src/mips64/lithium-codegen-mips64.cc
src/mips64/lithium-mips64.cc
src/mips64/macro-assembler-mips64.cc
src/mips64/macro-assembler-mips64.h
src/objects.cc
src/register-configuration.cc [new file with mode: 0644]
src/register-configuration.h [new file with mode: 0644]
src/x64/assembler-x64.cc
src/x64/assembler-x64.h
src/x64/code-stubs-x64.h
src/x64/deoptimizer-x64.cc
src/x64/lithium-codegen-x64.cc
src/x64/lithium-x64.cc
src/x64/macro-assembler-x64.cc
src/x64/macro-assembler-x64.h
src/x87/assembler-x87.h
test/cctest/compiler/test-gap-resolver.cc
test/cctest/compiler/test-run-native-calls.cc
test/cctest/test-code-stubs-arm.cc
test/cctest/test-code-stubs-arm64.cc
test/cctest/test-code-stubs-ia32.cc
test/cctest/test-code-stubs-mips.cc
test/cctest/test-code-stubs-mips64.cc
test/cctest/test-code-stubs-x64.cc
test/unittests/compiler/instruction-selector-unittest.cc
test/unittests/compiler/instruction-sequence-unittest.cc
test/unittests/compiler/instruction-sequence-unittest.h
test/unittests/compiler/register-allocator-unittest.cc
tools/gyp/v8.gyp