OSDN Git Service

Build dominator tree before generating HInstructions
authorDavid Brazdil <dbrazdil@google.com>
Tue, 16 Feb 2016 09:26:07 +0000 (09:26 +0000)
committerDavid Brazdil <dbrazdil@google.com>
Mon, 4 Apr 2016 10:21:20 +0000 (11:21 +0100)
commit86ea7eeabe30c98bbe1651a51d03cb89776724e7
tree01702f6df5c39925b354a3152dd04289e7d97062
parent0cb5c86b7021e70cbf584c1455aad1ef383af786
Build dominator tree before generating HInstructions

Second CL in the series of merging HGraphBuilder and SsaBuilder. This
patch refactors the builders so that dominator tree can be built
before any HInstructions are generated. This puts the SsaBuilder
removal of HLoadLocals/HStoreLocals straight after HGraphBuilder's
HInstruction generation phase. Next CL will therefore be able to
merge them.

This patch also adds util classes for iterating bytecode and switch
tables which allowed to simplify the code.

Bug: 27894376
Change-Id: Ic425d298b2e6e7980481ed697230b1a0b7904526
22 files changed:
compiler/Android.mk
compiler/optimizing/block_builder.cc [new file with mode: 0644]
compiler/optimizing/block_builder.h [new file with mode: 0644]
compiler/optimizing/builder.cc
compiler/optimizing/builder.h
compiler/optimizing/bytecode_utils.h [new file with mode: 0644]
compiler/optimizing/code_generator.cc
compiler/optimizing/constant_folding_test.cc
compiler/optimizing/dead_code_elimination_test.cc
compiler/optimizing/graph_checker.cc
compiler/optimizing/inliner.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/optimizing_compiler.cc
compiler/optimizing/optimizing_compiler_stats.h
compiler/optimizing/optimizing_unit_test.h
compiler/optimizing/pretty_printer_test.cc
compiler/optimizing/ssa_builder.cc
compiler/optimizing/ssa_builder.h
test/510-checker-try-catch/smali/Builder.smali
test/510-checker-try-catch/smali/SsaBuilder.smali
test/543-checker-dce-trycatch/smali/TestCase.smali