diff options
| author | 2015-03-02 15:14:13 -0800 | |
|---|---|---|
| committer | 2015-03-03 17:39:04 -0800 | |
| commit | e4335eb5bcbca6927e51c10cf0de3516d94ef599 (patch) | |
| tree | 3f69b4a17dc5d7ac5f6cab1ffee5a4091b5c9ba9 /compiler/optimizing/nodes.h | |
| parent | 5e42cd3eee2c89214a331a36fe226cfcc57917a3 (diff) | |
Make BCE a no-op if there is no array access.
Change-Id: I8456182808c1dbaa0c0ae1b8c2e94bb17baf5f29
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 98076a05f2..b7dd756452 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -113,6 +113,7 @@ class HGraph : public ArenaObject<kArenaAllocMisc> { number_of_vregs_(0), number_of_in_vregs_(0), temporaries_vreg_slots_(0), + has_array_accesses_(false), current_instruction_id_(start_instruction_id) {} ArenaAllocator* GetArena() const { return arena_; } @@ -199,6 +200,14 @@ class HGraph : public ArenaObject<kArenaAllocMisc> { return reverse_post_order_; } + bool HasArrayAccesses() const { + return has_array_accesses_; + } + + void SetHasArrayAccesses(bool value) { + has_array_accesses_ = value; + } + HNullConstant* GetNullConstant(); private: @@ -236,6 +245,9 @@ class HGraph : public ArenaObject<kArenaAllocMisc> { // Number of vreg size slots that the temporaries use (used in baseline compiler). size_t temporaries_vreg_slots_; + // Has array accesses. We can totally skip BCE if it's false. + bool has_array_accesses_; + // The current id to assign to a newly added instruction. See HInstruction.id_. int32_t current_instruction_id_; |