diff options
author | 2015-01-02 17:00:44 +0000 | |
---|---|---|
committer | 2015-02-17 21:06:27 +0000 | |
commit | 7a01dc2107d4255b445c32867d15d45fcebb3acd (patch) | |
tree | 5f25d4a2889e6fbcb5119484f2b0b6a4253f9b00 /compiler/dex/mir_graph.cc | |
parent | bce889940f10319bf67bdc5630c84dd7f6e5c246 (diff) |
Dead code elimination based on GVN results.
Change-Id: I5b77411a8f088f0b561da14b123cf6b0501c9db5
Diffstat (limited to 'compiler/dex/mir_graph.cc')
-rw-r--r-- | compiler/dex/mir_graph.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index 9f985890b1..08ca1b288c 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -2559,4 +2559,13 @@ const uint16_t* MIRGraph::GetInsns(int m_unit_index) const { return m_units_[m_unit_index]->GetCodeItem()->insns_; } +void MIRGraph::SetPuntToInterpreter(bool val) { + punt_to_interpreter_ = val; + if (val) { + // Disable all subsequent optimizations. They may not be safe to run. (For example, + // LVN/GVN assumes there are no conflicts found by the type inference pass.) + cu_->disable_opt = ~static_cast<decltype(cu_->disable_opt)>(0); + } +} + } // namespace art |