OSDN Git Service

ART: Boolean simplifier
authorDavid Brazdil <dbrazdil@google.com>
Mon, 16 Mar 2015 17:31:52 +0000 (17:31 +0000)
committerDavid Brazdil <dbrazdil@google.com>
Tue, 24 Mar 2015 17:28:37 +0000 (17:28 +0000)
commit46e2a3915aa68c77426b71e95b9f3658250646b7
tree2b0a4470b05291894db73c631fe94f0fdff8c46b
parentbce0855ca1dbb1fa226c5b6a81760272ce0b64ef
ART: Boolean simplifier

The optimization recognizes the negation pattern generated by 'javac'
and replaces it with a single condition. To this end, boolean values
are now consistently assumed to be represented by an integer.

This is a first optimization which deletes blocks from the HGraph and
does so by replacing the corresponding entries with null. Hence,
existing code can continue indexing the list of blocks with the block
ID, but must check for null when iterating over the list.

Change-Id: I7779da69cfa925c6521938ad0bcc11bc52335583
19 files changed:
compiler/Android.mk
compiler/optimizing/boolean_simplifier.cc [new file with mode: 0644]
compiler/optimizing/boolean_simplifier.h [new file with mode: 0644]
compiler/optimizing/builder.cc
compiler/optimizing/builder.h
compiler/optimizing/code_generator.cc
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_arm64.cc
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86_64.cc
compiler/optimizing/graph_checker.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/optimizing_compiler.cc
compiler/optimizing/ssa_liveness_analysis.cc
runtime/primitive.h
test/463-checker-boolean-simplifier/expected.txt [new file with mode: 0644]
test/463-checker-boolean-simplifier/info.txt [new file with mode: 0644]
test/463-checker-boolean-simplifier/src/Main.java [new file with mode: 0644]