summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/constant_folding.cc
Commit message (Collapse)AuthorAgeFilesLines
* ART: Force constants into the entry blockDavid Brazdil2015-03-261-16/+12
| | | | | | | | | | | | | | | | | | Optimizations such as GVN and BCE make the assumption that all constants are located in the entry block of the CFG, but not all passes adhere to this rule. This patch makes constructors of constants private and only accessible to friend classes - HGraph for int/long constants and SsaBuilder for float/double - which ensure that they are placed correctly and not duplicated. Note that the ArenaAllocatorAdapter was modified to not increment the ArenaAllocator's internal reference counter in order to allow for use of ArenaSafeMap inside an arena-allocated objects. Because their destructor is not called, the counter does not get decremented. Change-Id: I36a4fa29ae34fb905cdefd482ccbf386cff14166
* Opt compiler: Basic simplification for arithmetic operations.Alexandre Rames2015-03-111-0/+180
| | | | | | | The optimisations in this patch do not look further than the inputs of each operation. Change-Id: Iddd0ab6b360b9e7bb042db22086d51a31be85530
* ART: More warningsAndreas Gampe2014-11-041-3/+3
| | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* Constant folding on unary operations in the optimizing compiler.Roland Levillain2014-10-211-3/+11
| | | | Change-Id: I4b77afa2a89f5ad2eedd4d6c0c6c382585419349
* Revert "Revert "Introduce a class to implement optimization passes.""Roland Levillain2014-10-171-0/+47
| | | | | | This reverts commit 1ddbf6d4b37979a9f11a203c12befd5ae8b65df4. Change-Id: I110a14668d1564ee0604dc958b91394b40da89fc
* Revert "Introduce a class to implement optimization passes."Nicolas Geoffray2014-10-011-47/+0
| | | | | | This reverts commit bf9cd7ba2118a75f5aa9b56241c4d5fa00dedeb8. Change-Id: I0a483446666c9c24c45925a5fc199debdefd8b3e
* Introduce a class to implement optimization passes.Roland Levillain2014-10-011-0/+47
- 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