summaryrefslogtreecommitdiff
path: root/compiler/optimizing/select_generator.h
AgeCommit message (Collapse)Author
2025-01-17Optimizing: Rename `HSelectGenerator`... Vladimir Marko
... to `HCodeFlowSimplifier` in preparation for adding more optimizations to this pass. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Icb05c3455d93a7b939f82ced9b08165e533bb21a
2022-11-07Reland "Make compiler/optimizing/ symbols hidden." VladimĂ­r Marko
This reverts commit 0a51605ddd81635135463dab08b6f7c21b58ffb0. Reason for revert: Reland after some of the required work was merged in other CLs. Also address a TODO from the original CL to mark required symbols with EXPORT in `intrinsic_objects.h`. Also mark symbols in new files as HIDDEN. Bug: 186902856 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I936d448983928af23614ca82c2d0bf9a645e2c52
2022-08-09Generate selects for nested ternary operators Santiago Aboy Solanes
After an R8 update, the generated dex instructions are different which means that the structure of the graph is different and we weren't recognizing a possibility of select generation. We now recognize it and can update the graph on the fly, generating the corresponding selects. Bug: 239385201 Fixes: 239385201 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I07644f0a69369e809994b4dd39bdd95c2cc7dc6c
2020-05-13Move HandleCache to HGraph. Vladimir Marko
This avoids passing the `VariableSizedHandleScope*` argument around and eliminates HGraph::inexact_object_rti_ and its initialization. The latter shall allow running Optimizing gtests that do not require type information without creating a Runtime in future. (To be implemented in a separate CL.) Test: m test-art-host-gtest Test: testrunner.py --host --optmizing Test: aosp_taimen-userdebug boots. Change-Id: I36fe9bc556c6d610d644c8c14cc74c9985a14d64
2019-10-14Revert "Make compiler/optimizing/ symbols hidden." Vladimir Marko
This reverts commit e2727154f25e0db9a5bb92af494d8e47b181dfcf. Reason for revert: Breaks ASAN tests (ODR violation). Bug: 142365358 Change-Id: I38103d74a1297256c81d90872b6902ff1e9ef7a4
2019-10-14Make compiler/optimizing/ symbols hidden. Vladimir Marko
Make symbols in compiler/optimizing hidden by a namespace attribute. The unit intrinsic_objects.{h,cc} is excluded as it is needed by dex2oat. As the symbols are no longer exported, gtests are now linked with the static version of the libartd-compiler library. libart-compiler.so size: - before: arm: 2396152 arm64: 3345280 - after: arm: 2016176 (-371KiB, -15.9%) arm64: 2874480 (-460KiB, -14.1%) Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit Bug: 142365358 Change-Id: I1fb04a33351f53f00b389a1642e81a68e40912a8
2018-08-28Use 'final' and 'override' specifiers directly in ART. Roland Levillain
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with 'final' and 'override' specifiers. Remove all definitions of these macros as well, which were located in these files: - libartbase/base/macros.h - test/913-heaps/heaps.cc - test/ti-agent/ti_macros.h ART is now using C++14; the 'final' and 'override' specifiers have been introduced in C++11. Test: mmma art Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
2018-04-26Step 1 of 2: conditional passes. Aart Bik
Rationale: The change adds a return value to Run() in preparation of conditional pass execution. The value returned by Run() is best effort, returning false means no optimizations were applied or no useful information was obtained. I filled in a few cases with more exact information, others still just return true. In addition, it integrates inlining as a regular pass, avoiding the ugly "break" into optimizations1 and optimziations2. Bug: b/78171933, b/74026074 Test: test-art-host,target Change-Id: Ia39c5c83c01dcd79841e4b623917d61c754cf075
2017-11-20Refactored optimization passes setup. Aart Bik
Rationale: Refactors the way we set up optimization passes in the compiler into a more centralized approach. The refactoring also found some "holes" in the existing mechanism (missing string lookup in the debugging mechanism, or inablity to set alternative name for optimizations that may repeat). Bug: 64538565 Test: test-art-host test-art-target Change-Id: Ie5e0b70f67ac5acc706db91f64612dff0e561f83
2017-10-12Use ScopedArenaAllocator in BCE, DCE, LSE, ... Vladimir Marko
... ReferenceTypePropagation and GraphChecker. Define and use a new allocation kind for LoadStoreAnalysis. Memory needed to compile the two most expensive methods for aosp_angler-userdebug boot image: BatteryStats.dumpCheckinLocked() : 19.7MiB -> 19.6MiB (-79KiB) BatteryStats.dumpLocked(): 39.4MiB -> 39.3MiB (-120KiB) Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 64312607 Change-Id: Ib0cf074ac21ab67d8f8f2efabbdfb84cce9cae8e
2017-08-10RFC: Generate select instruction for conditional returns. Mads Ager
The select generator currently only inserts select instructions if there is a diamond shape with a phi. This change extends the select generator to also deal with the pattern: if (condition) { movable instruction 0 return value0 } else { movable instruction 1 return value1 } which it turns into: moveable instruction 0 moveable instruction 1 return select (value0, value1, condition) Test: 592-checker-regression-bool-input Change-Id: Iac50fb181dc2c9b7619f28977298662bc09fc0e1
2016-02-18Add statistics support for some optimizations Jean-Philippe Halimi
This patch adds support for the --dump-stats facility with some optimizations and fixes all build issues introduced by the patch: I68751b119a030952a11057cb651a3c63e87e73ea (which got reverted) Change-Id: I5af1f2a8cced0a1a55c2bb4d8c88e6f0a24ec879 Signed-off-by: Jean-Philippe Halimi <jean-philippe.halimi@intel.com>
2016-01-28ART: Implement HSelect David Brazdil
This patch adds a new HIR instruction to Optimizing. HSelect returns one of two inputs based on the outcome of a condition. This is only initial implementation which: - defines the new instruction, - repurposes BooleanSimplifier to emit it, - extends InstructionSimplifier to statically resolve it, - updates existing code and tests accordingly. Code generators currently emit fallback if/then/else code and will be updated in follow-up CLs to use platform-specific conditional moves when possible. Change-Id: Ib61b17146487ebe6b55350c2b589f0b971dcaaee