dee58d6bb6d567fcd0c4f39d8d690c3acaf0e432 |
|
07-Apr-2016 |
David Brazdil <dbrazdil@google.com> |
Revert "Revert "Refactor HGraphBuilder and SsaBuilder to remove HLocals"" This patch merges the instruction-building phases from HGraphBuilder and SsaBuilder into a single HInstructionBuilder class. As a result, it is not necessary to generate HLocal, HLoadLocal and HStoreLocal instructions any more, as the builder produces SSA form directly. Saves 5-15% of arena-allocated memory (see bug for more data): GMS 20.46MB => 19.26MB (-5.86%) Maps 24.12MB => 21.47MB (-10.98%) YouTube 28.60MB => 26.01MB (-9.05%) This CL fixed an issue with parsing quickened instructions. Bug: 27894376 Bug: 27998571 Bug: 27995065 Change-Id: I20dbe1bf2d0fe296377478db98cb86cba695e694
|
60328910cad396589474f8513391ba733d19390b |
|
04-Apr-2016 |
David Brazdil <dbrazdil@google.com> |
Revert "Refactor HGraphBuilder and SsaBuilder to remove HLocals" Bug: 27995065 This reverts commit e3ff7b293be2a6791fe9d135d660c0cffe4bd73f. Change-Id: I5363c7ce18f47fd422c15eed5423a345a57249d8
|
e3ff7b293be2a6791fe9d135d660c0cffe4bd73f |
|
02-Mar-2016 |
David Brazdil <dbrazdil@google.com> |
Refactor HGraphBuilder and SsaBuilder to remove HLocals This patch merges the instruction-building phases from HGraphBuilder and SsaBuilder into a single HInstructionBuilder class. As a result, it is not necessary to generate HLocal, HLoadLocal and HStoreLocal instructions any more, as the builder produces SSA form directly. Saves 5-15% of arena-allocated memory (see bug for more data): GMS 20.46MB => 19.26MB (-5.86%) Maps 24.12MB => 21.47MB (-10.98%) YouTube 28.60MB => 26.01MB (-9.05%) Bug: 27894376 Change-Id: Iefe28d40600c169c5d306fd2c77034ae19476d90
|
86ea7eeabe30c98bbe1651a51d03cb89776724e7 |
|
16-Feb-2016 |
David Brazdil <dbrazdil@google.com> |
Build dominator tree before generating HInstructions Second CL in the series of merging HGraphBuilder and SsaBuilder. This patch refactors the builders so that dominator tree can be built before any HInstructions are generated. This puts the SsaBuilder removal of HLoadLocals/HStoreLocals straight after HGraphBuilder's HInstruction generation phase. Next CL will therefore be able to merge them. This patch also adds util classes for iterating bytecode and switch tables which allowed to simplify the code. Bug: 27894376 Change-Id: Ic425d298b2e6e7980481ed697230b1a0b7904526
|
d96a246e5b103bfc167acaa6315bd8abca9de493 |
|
23-Mar-2016 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Do not insert suspend checks on back-edges. Rely on HGraph::SimplifyLoop() to insert suspend checks. CodeGenerator's CheckLoopEntriesCanBeUsedForOsr() checks the dex pcs of suspend checks against branch targets to verify that we always have an appropriate point for OSR transition. However, the HSuspendChecks that were added by HGraphBuilder to support the recently removed "baseline" interfered with this in a specific case, namely an infinite loop where the back-branch jumps to a nop. In that case, the HSuspendCheck added by HGraphBuilder had a dex pc different from the block and the branch target but its presence would stop the HGraph::SimplifyLoop() from adding a new HSuspendCheck with the correct dex pc. Bug: 27623547 Change-Id: I83566a260210bc05aea0c44509a39bb490aa7003
|
badd826664896d4a9628a5a89b78016894aa414b |
|
02-Feb-2016 |
David Brazdil <dbrazdil@google.com> |
ART: Run SsaBuilder from HGraphBuilder First step towards merging the two passes, which will later result in HGraphBuilder directly producing SSA form. This CL mostly just updates tests broken by not being able to inspect the pre-SSA form. Using HLocals outside the HGraphBuilder is now deprecated. Bug: 27150508 Change-Id: I00fb6050580f409dcc5aa5b5aa3a536d6e8d759e
|
4833f5a1990c76bc2be89504225fb13cca22bedf |
|
16-Dec-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Refactor SsaBuilder for more precise typing info This reverts commit 68289a531484d26214e09f1eadd9833531a3bc3c. Now uses Primitive::Is64BitType instead of Primitive::ComponentSize because it was incorrectly optimized by GCC. Bug: 26208284 Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: Ib39f3da2b92bc5be5d76f4240a77567d82c6bebe
|
68289a531484d26214e09f1eadd9833531a3bc3c |
|
16-Dec-2015 |
Alex Light <allight@google.com> |
Revert "ART: Refactor SsaBuilder for more precise typing info" This reverts commit d9510dfc32349eeb4f2145c801f7ba1d5bccfb12. Bug: 26208284 Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: I5f491becdf076ff51d437d490405ec4e1586c010
|
d9510dfc32349eeb4f2145c801f7ba1d5bccfb12 |
|
05-Nov-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Refactor SsaBuilder for more precise typing info This patch refactors the SsaBuilder to do the following: 1) All phis are constructed live and marked dead if not used or proved to be conflicting. 2) Primitive type propagation, now not a separate pass, identifies conflicting types and marks corresponding phis dead. 3) When compiling --debuggable, DeadPhiHandling used to revive phis which had only environmental uses but did not attempt to resolve conflicts. This pass was removed as obsolete and is now superseded by primitive type propagation (identifying conflicting phis) and SsaDeadPhiEliminiation (keeping phis live if debuggable + env use). 4) Resolving conflicts requires correct primitive type information on all instructions. This was not the case for ArrayGet instructions which can have ambiguous types in the bytecode. To this end, SsaBuilder now runs reference type propagation and types ArrayGets from the type of the input array. 5) With RTP being run inside the SsaBuilder, it is not necessary to run it as a separate optimization pass. Optimizations can now assume that all instructions of type kPrimNot have reference type info after SsaBuilder (with the exception of NullConstant). 6) Graph now contains a reference type to be assigned to NullConstant. All reference type instructions therefore have RTI, as now enforced by the SsaChecker. Bug: 24252151 Bug: 24252100 Bug: 22538329 Bug: 25786318 Change-Id: I7a3aee1ff66c82d64b4846611c547af17e91d260
|
58554b7de4b437ddef7ff550e62c8ec0b16f9264 |
|
21-Oct-2015 |
Andreas Gampe <agampe@google.com> |
ART: Fix left-shift of negative numbers Shifting negative numbers is undefined. Change-Id: I0c32a3fcf372eae74507a5f2383edbfaf5c6830c
|
655e585073ac271cc9afa7c9d6ff5ab4dbe4b72e |
|
12-Oct-2015 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Move GraphChecker memory allocations to arena. Bug: 18120045 Change-Id: I3934158e6ea4868d9baa1dfcc53b603ca6c521e2
|
1e256bf257e8d97df9b2178ae8658b731ca2d662 |
|
19-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Be careful with predecessor/successor index. When we simplify the CFG, we must preserve things that were already simplified. For example, the index in the predecessor list or successor list of a block must be preserved for ensuring the first block is a loop pre header. bug:21867463 (cherry picked from commit 8b20f88b0a8d1b374dd5eaae289d19734c77b8f8) Change-Id: I2581b5a50942290da96cd9ec876f6f2573e0a6c4
|
8b20f88b0a8d1b374dd5eaae289d19734c77b8f8 |
|
19-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Be careful with predecessor/successor index. When we simplify the CFG, we must preserve things that were already simplified. For example, the index in the predecessor list or successor list of a block must be preserved for ensuring the first block is a loop pre header. bug:21867463 Change-Id: Ic3fcb3eb2c3fb109d8a57ee2a6b6d4d65fdb9410
|
1c533c17baff841e383a539fdd3c0a65135181b0 |
|
24-Apr-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Fix gtests broken by dead block elimination Change-Id: If5de97f928f9e214d64871eabfbfb3f2d15451b7
|
862aaefdd63d8058b54a7d956a0229eec9dcbde6 |
|
22-Apr-2015 |
Calin Juravle <calin@google.com> |
[optimizing] Name the last DCE pass. This will allow Checker to differentiate between them. Change-Id: I972d452a64f1c19d370567b9ef3d620f9b835a9a
|
8f20bdb9d3b7516e75a7845e610105d87ce25ae6 |
|
21-Apr-2015 |
Calin Juravle <calin@google.com> |
Run DCE again after all the other optimizations have run. On docs this doubles the amount of instructions removed.
|
b29ea8ca08fb6074f1af503f76751120626d6c1e |
|
21-Apr-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "fix optimizing gtests" This reverts commit 69dcf64251d70f616ae6c435d4788545130d42f0. Change-Id: I1e01c17a3aa8b001ad5659260802e5f5073bf14e
|
69dcf64251d70f616ae6c435d4788545130d42f0 |
|
21-Apr-2015 |
Calin Juravle <calin@google.com> |
fix optimizing gtests Change-Id: I207398d8a65482650fba87db12a3b51e8b114694
|
fb8d279bc011b31d0765dc7ca59afea324fd0d0c |
|
01-Apr-2015 |
Mark Mendell <mark.p.mendell@intel.com> |
[optimizing] Implement x86/x86_64 math intrinsics Implement floor/ceil/round/RoundFloat on x86 and x86_64. Implement RoundDouble on x86_64. Add support for roundss and roundsd on both architectures. Support them in the disassembler as well. Add the instruction set features for x86, as the 'round' instruction is only supported if SSE4.1 is supported. Fix the tests to handle the addition of passing the instruction set features to x86 and x86_64. Add assembler tests for roundsd and roundss to x86_64 assembler tests. Change-Id: I9742d5930befb0bbc23f3d6c83ce0183ed9fe04f Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
|
cd6dffedf1bd8e6dfb3fb0c933551f9a90f7de3f |
|
08-Jan-2015 |
Calin Juravle <calin@google.com> |
Add implicit null checks for the optimizing compiler - for backends: arm, arm64, x86, x86_64 - fixed parameter passing for CodeGenerator - 003-omnibus-opcodes test verifies that NullPointerExceptions work as expected Change-Id: I1b302acd353342504716c9169a80706cf3aba2c8
|
e53798a7e3267305f696bf658e418c92e63e0834 |
|
01-Dec-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Inlining support in optimizing. Currently only inlines simple things that don't require an environment, such as: - Returning a constant. - Returning a parameter. - Returning an arithmetic operation. Change-Id: Ie844950cb44f69e104774a3cf7a8dea66bc85661
|
5e6916cea259897baaca019c5c7a5d05746306ed |
|
18-Nov-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Use HOptimization abstraction for running optimizations. Move existing optimizations to it. Change-Id: I3b43f9997faf4ed8875162e3a3abdf99375478dd
|
75be28332b278cff9039b54bfb228ac72f539ccc |
|
17-Oct-2014 |
Roland Levillain <rpl@google.com> |
Revert "Revert "Introduce a class to implement optimization passes."" This reverts commit 1ddbf6d4b37979a9f11a203c12befd5ae8b65df4. Change-Id: I110a14668d1564ee0604dc958b91394b40da89fc
|
633021e6ff6b9a57a374a994e74cfd69275ce100 |
|
01-Oct-2014 |
Roland Levillain <rpl@google.com> |
Implement default traversals in CFG & SSA graph checkers. - Check CFG graphs using an insertion order traversal. - Check SSA form graphs using a reverse post-order traversal. Change-Id: Ib9062599bdbf3c17b9f213b743274b2d71a9fa90
|
1ddbf6d4b37979a9f11a203c12befd5ae8b65df4 |
|
01-Oct-2014 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Introduce a class to implement optimization passes." This reverts commit bf9cd7ba2118a75f5aa9b56241c4d5fa00dedeb8. Change-Id: I0a483446666c9c24c45925a5fc199debdefd8b3e
|
bf9cd7ba2118a75f5aa9b56241c4d5fa00dedeb8 |
|
30-Sep-2014 |
Roland Levillain <rpl@google.com> |
Introduce a class to implement optimization passes. - 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
|
72bceff11a98cc1ecdb64a6fae16c521f99ec6a7 |
|
15-Sep-2014 |
Roland Levillain <rpl@google.com> |
Initiate a dead code elimination pass in the optimizing compiler. Change-Id: Ie9db5d8e2c2c30e34145a0f7d2386b8ec58cfc4e
|