summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/dead_code_elimination.cc
Commit message (Collapse)AuthorAgeFilesLines
* Recompute dominator tree after DCE.Nicolas Geoffray2015-06-241-0/+9
| | | | | | | | bug:22031382 (cherry picked from commit 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1) Change-Id: I9a74edb185cb806045903dfe9695d9cc1a02e86b
* ART: Rediscover loops after deleting blocks in DCEDavid Brazdil2015-05-131-6/+18
| | | | | | | | | The way DCE currently updates loop information does not cover all cases. This patch removes the logic, resets loop information of live blocks to pre-SSA state and reanalyzes the affected loops. Change-Id: I0b996a70235b95a8db0de9a23a03f71db57a21b8 (cherry picked from commit a4b8c21dae70ae34aee13628632c39a675c06022)
* ART: Fix loop information after dead code eliminationDavid Brazdil2015-04-291-3/+6
| | | | | | | | | | Compilation failed when only some blocks of a loop were removed during dead code elimination. Bug: 20680703 (cherry picked from commit 69a2804c3bb48cf4fd00a66080f613a4fd96c422) Change-Id: If9988381236e4d8d8c3b508dfce1376b27c20d75
* ART: Dead block removalDavid Brazdil2015-04-241-3/+76
| | | | | | | | | Adds a new pass which finds all unreachable blocks, typically due to simplifying an if-condition to a constant, and removes them from the graph. The patch also slightly generalizes the graph-transforming operations. Change-Id: Iff7c97f1d10b52886f3cd7401689ebe1bfdbf456
* Run DCE again after all the other optimizations have run.Calin Juravle2015-04-221-0/+1
| | | | On docs this doubles the amount of instructions removed.
* Revert "Run DCE again after all the other optimizations have run."Nicolas Geoffray2015-04-211-1/+0
| | | | | | | | Reverting because of libcore failures. This reverts commit 7a9c885684c965fe84f91d8ad74f54f869e2a448. Change-Id: Iafe59b02fe7617243d81533d66e609a3528e7a58
* Run DCE again after all the other optimizations have run.Calin Juravle2015-04-211-0/+1
| | | | | | On docs this doubles the amount of instructions removed. Change-Id: I1712a92c0c0b3b32b111d194b64d8ea81d652822
* [optimizing] Add memory barriers in constructors when neededCalin Juravle2015-04-201-0/+1
| | | | | | | | | If a class has final fields we must add a memory barrier before returning from constructor. This makes sure the fields are visible to other threads. Bug: 19851497 Change-Id: If8c485092fc512efb9636cd568cb0543fb27688e
* Revert "Revert "Introduce a class to implement optimization passes.""Roland Levillain2014-10-171-1/+1
| | | | | | This reverts commit 1ddbf6d4b37979a9f11a203c12befd5ae8b65df4. Change-Id: I110a14668d1564ee0604dc958b91394b40da89fc
* Do not remove NullChecks & BoundsChecks in HDeadCodeElimination.Roland Levillain2014-10-141-1/+4
| | | | | | | Removing a NullCheck or a BoundsCheck instruction may change the behavior of a program. Change-Id: Ib2c9beff0cc98c382210e7cc88b1fa9af3c61887
* Revert "Introduce a class to implement optimization passes."Nicolas Geoffray2014-10-011-1/+1
| | | | | | This reverts commit bf9cd7ba2118a75f5aa9b56241c4d5fa00dedeb8. Change-Id: I0a483446666c9c24c45925a5fc199debdefd8b3e
* Introduce a class to implement optimization passes.Roland Levillain2014-10-011-1/+1
| | | | | | | | | | | | | | | | - Add art::HOptimization. - Rename art::ConstantPropagation to art::HConstantFolding in compiler/optimizing/constant_folding.h to avoid name clashes with a class of the same name in compiler/dex/post_opt_passes.h. - Rename art::DeadCodeElimination to art::HDeadCodeElimination for consistency reasons. - Have art::HDeadCodeElimination and art::HConstantFolding derive from art::HOptimization. - Start to use these optimizations in art:OptimizingCompiler::TryCompile. Change-Id: Iaab350c122d87b2333b3760312b15c0592d7e010
* Make suspend checks note have side effects.Nicolas Geoffray2014-09-251-1/+1
| | | | | | Also adjust gtests. Change-Id: I5e1a3e53115812b45ec7f4b6f50ba468fa7ac6b1
* Initiate a dead code elimination pass in the optimizing compiler.Roland Levillain2014-09-171-0/+45
Change-Id: Ie9db5d8e2c2c30e34145a0f7d2386b8ec58cfc4e