summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization_test.cc
AgeCommit message (Collapse)Author
2020-05-15Optimizing: Run gtests without creating the Runtime.Vladimir Marko
The only Optimizing test that actually needs a Runtime is the ReferenceTypePropagationTest, so we make it subclass CommonCompilerTest explicitly and change OptimizingUnitTest to subclass CommonArtTest for the other tests. On host, each test that initializes the Runtime takes ~220ms more than without initializing the Runtime. For example, the ConstantFoldingTest that has 10 individual tests previously took over 2.2s to run but without the Runtime initialization it takes around 3-5ms. On target, running 32-bit gtests on taimen with run-gtests.sh (single-threaded) goes from ~28m47s to ~26m13s, a reduction of ~9%. Test: m test-art-host-gtest Test: run-gtests.sh Change-Id: I43e50ed58e52cc0ad04cdb4d39801bfbae840a3d
2020-04-17ART: Refactor SIMD slots and regs size processing.Artem Serov
ART vectorizer assumes that there is single size of SIMD register used for the whole program. Make this assumption explicit and refactor the code. Note: This is a base for the future introduction of SIMD slots of size other than 8 or 16 bytes. Test: test-art-target, test-art-host. Change-Id: Id699d5e3590ca8c655ecd9f9ed4e63f49e3c4f9c
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-12-27ART: Refactor for bugprone-argument-commentAndreas Gampe
Handles compiler. Bug: 116054210 Test: WITH_TIDY=1 mmma art Change-Id: I5cdfe73c31ac39144838a2736146b71de037425e
2018-06-25Move instruction_set_ to CompilerOptions.Vladimir Marko
Removes CompilerDriver dependency from ImageWriter and several other classes. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Change-Id: I3c5b8ff73732128b9c4fad9405231a216ea72465
2018-03-07ART: Implement loop peeling/unrolling routines.Artem Serov
Implement loop peeling/unrolling routines using SuperblockCloner. Fixes bug b/74198030 and provides tests for it. Bug: b/74198030 Test: superblock_cloner_test.cc, loop_optimization_test.cc. Change-Id: Id0d9a91575c88f8e45186441b14e903b89b007dd
2017-12-13ART: Fix single-preheader transformation.Artem Serov
Original implementation of "Make sure the loop has only one pre-header" had an assumption that the header had no phi functions since loops with multiple preheaders now only may exist during graph building before ssa construction; all of the optimizations preserve the single-preheader invariant. This code is used by DCE; DCE was called multiple times but after graph building preheader transformation was never executed. However if someone introduces a optimization which might not keep the invariant (e.g. loop peeling) the data flow adjustments must be performed. Test: loop_optimization_test.cc Test: test-art-target, test-art-host Change-Id: I88bb0aad2dd5241addef7fe9cda474a6868bf532
2017-10-06ART: Use ScopedArenaAllocator for pass-local data.Vladimir Marko
Passes using local ArenaAllocator were hiding their memory usage from the allocation counting, making it difficult to track down where memory was used. Using ScopedArenaAllocator reveals the memory usage. This changes the HGraph constructor which requires a lot of changes in tests. Refactor these tests to limit the amount of work needed the next time we change that constructor. Test: m test-art-host-gtest Test: testrunner.py --host Test: Build with kArenaAllocatorCountAllocations = true. Bug: 64312607 Change-Id: I34939e4086b500d6e827ff3ef2211d1a421ac91a
2017-09-25ART: Introduce compiler data type.Vladimir Marko
Replace most uses of the runtime's Primitive in compiler with a new class DataType. This prepares for introducing new types, such as Uint8, that the runtime does not need to know about. Test: m test-art-host-gtest Test: testrunner.py --host Bug: 23964345 Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
2017-09-06Pass stats into the loop optimization phase.Aart Bik
Test: market scan. Change-Id: I58b23b8d254883f30619ea3602d34bf93618d432
2017-08-03ART: Fix loop header's predecessors reordering in SimplifyLoops.Artem Serov
Fix the issue when after loop header's predecessors reordering in SimplifyLoops phi inputs are not reordered correspondingly. Test: loop_optimization_test.cc, test-art-host, test-art-target. Change-Id: I8a251a0a953d751f9bb67da58181e47d225d90e6
2017-03-06Pass driver to loop opt. Add new side_effects phase.Aart Bik
Rationale: Break-out CL of ART Vectorizer: number 3. The purpose is making the original CL smaller and easier to review. Bug: 34083438 Test: test-art-host Change-Id: I7cece807ee4f5fcaeae41f1deed33ac263447b77
2016-11-21ART: Add dex::TypeIndexAndreas Gampe
Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
2016-10-05Refactoring of graph linearization and linear order.Aart Bik
Rationale: Ownership of graph's linear order and iterators was a bit unclear now that other phases are using it. New approach allows phases to compute their own order, while ssa_liveness is sole owner for graph (since it is not mutated afterwards). Also shortens lifetime of loop's arena. Test: test-art-host Change-Id: Ib7137d1203a1e0a12db49868f4117d48a4277f30
2016-10-05Make it possible to pass an arena allocator to HLoopOptimization.Nicolas Geoffray
loop_optimization_test uses memory from HLoopOptimization's allocator, which is scoped by the Run method. Fix is to pass custom allocator. test: m test-art-host-gtest Change-Id: I359330e22202519f400a26da5403eeb00f0b2db4
2016-10-03A first implementation of a loop optimization framework.Aart Bik
Rationale: We are planning to add more and more loop related optimizations and this framework provides the basis to do so. For starters, the framework optimizes dead induction, induction that can be replaced with a simpler closed-form, and eliminates dead loops completely (either pre-existing or as a result of induction removal). Speedup on e.g. Benchpress Loop is 73x (17.5us. -> 0.24us.) [with the potential for more exploiting outer loop too] Test: 618-checker-induction et al. Change-Id: If80a809acf943539bf6726b0030dcabd50c9babc