OSDN Git Service

Implement irreducible loop support in optimizing.
authorNicolas Geoffray <ngeoffray@google.com>
Tue, 5 Jan 2016 15:55:41 +0000 (15:55 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Thu, 14 Jan 2016 15:00:20 +0000 (15:00 +0000)
commit15bd22849ee6a1ffb3fb3630f686c2870bdf1bbc
treea261601589163faa4538bcf1c9d156e8ec4a42b3
parent5b7b5ddb515828c93f0c2aec67aa513c32d0de22
Implement irreducible loop support in optimizing.

So we don't fallback to the interpreter in the presence of
irreducible loops.

Implications:
- A loop pre-header does not necessarily dominate a loop header.
- Non-constant redundant phis will be kept in loop headers, to
  satisfy our linear scan register allocation algorithm.
- while-graph optimizations, such as gvn, licm, lse, and dce
  need to know when they are dealing with irreducible loops.

Change-Id: I2cea8934ce0b40162d215353497c7f77d6c9137e
30 files changed:
compiler/optimizing/bounds_check_elimination.cc
compiler/optimizing/bounds_check_elimination_test.cc
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/dead_code_elimination.cc
compiler/optimizing/dex_cache_array_fixups_arm.cc
compiler/optimizing/find_loops_test.cc
compiler/optimizing/graph_checker.cc
compiler/optimizing/graph_visualizer.cc
compiler/optimizing/gvn.cc
compiler/optimizing/induction_var_analysis.cc
compiler/optimizing/inliner.cc
compiler/optimizing/licm.cc
compiler/optimizing/load_store_elimination.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/pc_relative_fixups_x86.cc
compiler/optimizing/register_allocator.cc
compiler/optimizing/register_allocator_test.cc
compiler/optimizing/ssa_builder.cc
compiler/optimizing/ssa_builder.h
compiler/optimizing/ssa_liveness_analysis.cc
compiler/optimizing/ssa_phi_elimination.cc
test/559-checker-irreducible-loop/expected.txt [new file with mode: 0644]
test/559-checker-irreducible-loop/info.txt [new file with mode: 0644]
test/559-checker-irreducible-loop/smali/IrreducibleLoop.smali [new file with mode: 0644]
test/559-checker-irreducible-loop/src/Main.java [new file with mode: 0644]