diff options
author | David Brazdil <dbrazdil@google.com> | 2015-03-16 17:31:52 +0000 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-03-24 17:28:37 +0000 |
commit | 46e2a3915aa68c77426b71e95b9f3658250646b7 (patch) | |
tree | 2b0a4470b05291894db73c631fe94f0fdff8c46b /compiler/optimizing/builder.h | |
parent | bce0855ca1dbb1fa226c5b6a81760272ce0b64ef (diff) | |
download | android_art-46e2a3915aa68c77426b71e95b9f3658250646b7.tar.gz android_art-46e2a3915aa68c77426b71e95b9f3658250646b7.tar.bz2 android_art-46e2a3915aa68c77426b71e95b9f3658250646b7.zip |
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
Diffstat (limited to 'compiler/optimizing/builder.h')
-rw-r--r-- | compiler/optimizing/builder.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 96196de588..c70170bb46 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -47,8 +47,6 @@ class HGraphBuilder : public ValueObject { exit_block_(nullptr), current_block_(nullptr), graph_(graph), - constant0_(nullptr), - constant1_(nullptr), dex_file_(dex_file), dex_compilation_unit_(dex_compilation_unit), compiler_driver_(driver), @@ -67,8 +65,6 @@ class HGraphBuilder : public ValueObject { exit_block_(nullptr), current_block_(nullptr), graph_(graph), - constant0_(nullptr), - constant1_(nullptr), dex_file_(nullptr), dex_compilation_unit_(nullptr), compiler_driver_(nullptr), @@ -100,8 +96,6 @@ class HGraphBuilder : public ValueObject { void MaybeUpdateCurrentBlock(size_t index); HBasicBlock* FindBlockStartingAt(int32_t index) const; - HIntConstant* GetIntConstant0(); - HIntConstant* GetIntConstant1(); HIntConstant* GetIntConstant(int32_t constant); HLongConstant* GetLongConstant(int64_t constant); void InitializeLocals(uint16_t count); @@ -253,9 +247,6 @@ class HGraphBuilder : public ValueObject { HBasicBlock* current_block_; HGraph* const graph_; - HIntConstant* constant0_; - HIntConstant* constant1_; - // The dex file where the method being compiled is. const DexFile* const dex_file_; |