a3aef2e42f4e88ae556432bd4a8040456a42bf74 |
|
06-Apr-2016 |
Roland Levillain <rpl@google.com> |
Move optimizations out of HInliner::TryBuildAndInlineHelper. This is a followup CL to https://android-review.googlesource.com/#/c/212651. Change-Id: I37d1c3fc06d8e36c335dd62887936486f7deeba4
|
916cc1d504f10a24f43b384e035fdecbe6a74b4c |
|
18-Feb-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Implement polymorphic inlining. For example, before: HInvokeVirtual After: If (receiver == Foo) { // inlined code. } else if (receiver == Bar) { // inlined code } else { // HInvokeVirtual or HDeoptimize(receiver != Baz) } Change-Id: I5ce305aef8f39f8294bf2b2bcfe60e0dddcfdbec
|
55bd749991f9a0a73f612696e1a93e739380546b |
|
16-Feb-2016 |
Nicolas Geoffray <ngeoffray@google.com> |
Refactor the inliner. In preparation for more polymorphic inlining, refactor the inliner a bit. Change-Id: Ie3fd6c1ef205f1089989c67a527e6f57ff3c8b5d
|
f8b3b8bc37fb04d8ae113ae6bfcf4de2f5a700d4 |
|
04-Feb-2016 |
Vladimir Marko <vmarko@google.com> |
Try to substitute constructor chains for IPUTs. Match a constructor chain where each constructor either forwards some or all of its arguments to the next (i.e. superclass constructor or a constructor in the same class) and may pass extra zeros (of any type, including null), followed by any number of IPUTs on "this", storing either arguments or zeros, until we reach the contructor of java.lang.Object. When collecting IPUTs from the constructor chain, remove any IPUTs that store the same field as an IPUT that comes later. This is safe in this case even if those IPUTs store volatile fields because the uninitialized object reference wasn't allowed to escape yet. Also remove any IPUTs that store zero values as the allocated object is already zero initialized. (cherry picked from commit 354efa6cdf558b2331e8fec539893fa51763806e) Change-Id: I691e3b82e550e7a3272ce6a81647c7fcd02c01b1
|
354efa6cdf558b2331e8fec539893fa51763806e |
|
04-Feb-2016 |
Vladimir Marko <vmarko@google.com> |
Try to substitute constructor chains for IPUTs. Match a constructor chain where each constructor either forwards some or all of its arguments to the next (i.e. superclass constructor or a constructor in the same class) and may pass extra zeros (of any type, including null), followed by any number of IPUTs on "this", storing either arguments or zeros, until we reach the contructor of java.lang.Object. When collecting IPUTs from the constructor chain, remove any IPUTs that store the same field as an IPUT that comes later. This is safe in this case even if those IPUTs store volatile fields because the uninitialized object reference wasn't allowed to escape yet. Also remove any IPUTs that store zero values as the allocated object is already zero initialized. Change-Id: If93022310bf04fe38ee741665ac4a65d4c2bb25f
|
be10e8e99a78caae01fb65769218800d465144ae |
|
22-Jan-2016 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Try pattern substitution when we cannot inline. Change-Id: I7c01f4494bac8498accc0f087044ec509fee4c98
|
a42363f79832a6e14f348514664dc6dc3edf9da2 |
|
17-Dec-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Implement first kind of polymorphic inlining. Add HClassTableGet to fetch an ArtMethod from the vtable or imt, and compare it to the only method the profiling saw. Change-Id: I76afd3689178f10e3be048aa3ac9a97c6f63295d
|
5949fa0cb9a8d26ac20b9b02065a63b4b20443be |
|
18-Dec-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Revert "Tweak inlining heuristics."" This reverts commit b17d1ccff0ac26fc22df671907ba2b4f4c656ce4. Change-Id: I26f6f8702a448c3da12662cbc6bc0f6e562bc40b
|
b17d1ccff0ac26fc22df671907ba2b4f4c656ce4 |
|
17-Dec-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Tweak inlining heuristics." This reverts commit fcb7613d3aaa9a6802800b6e957aaad51cedf6dc. Change-Id: Idc0df6a2f68e8b5aa740bb1259f19c2953811510
|
fcb7613d3aaa9a6802800b6e957aaad51cedf6dc |
|
17-Dec-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Tweak inlining heuristics. go/lem driven: Performance: Richards +41% CaffeineMethod +43% ReversiBench: +52% Towers: +73% Tak: +85% Memory use: 7% less memory CompileTime: 14% increase CodeSize: 8% increase Last three measures are now more acceptable given we JIT. Change-Id: Ic4aa6535d2b76cf3545ef00e9b2ae32330f10745
|
73be1e8f8609708f6624bb297c9628de44fd8b6f |
|
17-Sep-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Inline monomorphic calls. Change-Id: If38171c2dc7d4a4378df5d050afc4fff4499c98f
|
dc151b2346bb8a4fdeed0c06e54c2fca21d59b5d |
|
15-Oct-2015 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Determine invoke-static/-direct dispatch early. Determine the dispatch type of invoke-static/-direct in a special pass right after the type inference. This allows the inliner to pass the "needs dex cache" check and inline more. It also allows the code generator to avoid requesting a register location for the ArtMethod* for kDexCachePcRelative and direct methods. The supported dispatch check handles also situations that the CompilerDriver currently doesn't allow. The cleanup of the CompilerDriver and required changes to Quick will come in a separate change. Change-Id: I3f8e903a119949e95871d8ab0a995f4731a13a07
|
e418dda75998e0186f7580c2c54705767c3c8f1f |
|
12-Aug-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Be more flexible on the code unit size when inlining. This change increases the maximum code unit size, and fold parameters in the inlinee in the hope to reduce the overall size of the graph. We then make sure we don't inline methods that have more than N HInstructions. Also, remove the kAccDontInline flag on ArtMethod. The compiler does not need it anymore. Change-Id: I4cd3da40e551f30ba83b8b274728b87e67f6812e
|
581550137ee3a068a14224870e71aeee924a0646 |
|
19-Aug-2015 |
Vladimir Marko <vmarko@google.com> |
Revert "Revert "Optimizing: Better invoke-static/-direct dispatch."" Fixed kCallArtMethod to use correct callee location for kRecursive. This combination is used when compiling with debuggable flag set. This reverts commit b2c431e80e92eb6437788cc544cee6c88c3156df. Change-Id: Idee0f2a794199ebdf24892c60f8a5dcf057db01c
|
b2c431e80e92eb6437788cc544cee6c88c3156df |
|
19-Aug-2015 |
Vladimir Marko <vmarko@google.com> |
Revert "Optimizing: Better invoke-static/-direct dispatch." Reverting due to failing ndebug tests. This reverts commit 9b688a095afbae21112df5d495487ac5231b12d0. Change-Id: Ie4f69da6609df3b7c8443412b6cf7f5c43c2c5d9
|
9b688a095afbae21112df5d495487ac5231b12d0 |
|
06-May-2015 |
Vladimir Marko <vmarko@google.com> |
Optimizing: Better invoke-static/-direct dispatch. Add framework for different types of loading ArtMethod* and code pointer retrieval. Implement invoke-static and invoke-direct calls the same way as Quick. Document the dispatch kinds in HInvokeStaticOrDirect's new enumerations MethodLoadKind and CodePtrLocation. PC-relative loads from dex cache arrays are used only for x86-64 and arm64. The implementation for other architectures will be done in separate CLs. Change-Id: I468ca4d422dbd14748e1ba6b45289f0d31734d94
|
69ba7b7112c2277ac225615b37e6df74c055740d |
|
23-Jun-2015 |
David Brazdil <dbrazdil@google.com> |
ART: Run GraphChecker after Builder and SsaBuilder This patch refactors the way GraphChecker is invoked, utilizing the same scoping mechanism as pass timing and graph visualizer. Therefore, GraphChecker will now run not just after instances of HOptimization but after the builders and reg alloc, too. Change-Id: I8173b98b79afa95e1fcbf3ac9630a873d7f6c1d4
|
88593111c3a0fec728c1ced01740a20f702b3ffd |
|
22-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Revert "Add support for inlining already sharpened interface calls."" bug:21867144 This reverts commit ee39360775066e6b9920348c86ea98bf01d0facf. Change-Id: I69bf85ce7c352b1a22f36f0f2a136f95b4e73bd6
|
ee39360775066e6b9920348c86ea98bf01d0facf |
|
22-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Add support for inlining already sharpened interface calls. DO NOT MERGE ANYWHERE" This reverts commit c362782609ca6fbc355ccc9ea9110fe671db9671. Reverting in order to make a commit that will merge. bug:21867144
|
c362782609ca6fbc355ccc9ea9110fe671db9671 |
|
09-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Add support for inlining already sharpened interface calls. DO NOT MERGE ANYWHERE bug:21867144 Test had to change a bit because it was using some features from aosp not present in mnc-dev. (cherry picked from commit 3507105caea0d209c66a95d5ec5d739949105c5d) Change-Id: If12ea9a5c64e86b5bd3a5fd4a943bff60fe49762
|
ae09d2d244cf2f506822b3e14731b81c3b278f9d |
|
29-May-2015 |
Guillaume "Vermeille" Sanchez <guillaumesa@google.com> |
Bring ReferenceTypePropagation to HInvoke return types Change-Id: Id0683f67e32874713a30c072c71dc537b1271926
|
6c0c4f230f417ed484bae5c01b79551af7659389 |
|
12-Jun-2015 |
Calin Juravle <calin@google.com> |
Revert "Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types""" This reverts commit a981f9d5cac9a479d3b5d16508d71cfe17d95117. Change-Id: I69faf16d5ef0ecc234fb52e071b682e728a8bf97
|
a981f9d5cac9a479d3b5d16508d71cfe17d95117 |
|
12-Jun-2015 |
Calin Juravle <calin@google.com> |
Revert "Revert "Bring ReferenceTypePropagation to HInvoke return types"" This reverts commit 958857d0f9686770a3b1117166d5fa700b39704a. Change-Id: I196ff2a4453489f0105efc54eee73a2a9321ac4e
|
958857d0f9686770a3b1117166d5fa700b39704a |
|
12-Jun-2015 |
Calin Juravle <calin@google.com> |
Revert "Bring ReferenceTypePropagation to HInvoke return types" We exceed stack frame size with Clang in art::OptimizingCompiler::CompileOptimized This reverts commit ddedddcedaae78fc6aa29940fdb1fbe40bb05774. Change-Id: I6f992dda228acb9cae2087d1e6c78f2afdf30050
|
ddedddcedaae78fc6aa29940fdb1fbe40bb05774 |
|
29-May-2015 |
Guillaume "Vermeille" Sanchez <guillaumesa@google.com> |
Bring ReferenceTypePropagation to HInvoke return types Change-Id: I9a7e974787cb8ba75b86bd07e8a37c5fe99911c3
|
454a481d116ec4e6dc36fab23a073017b1436d7f |
|
09-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Revert "Support for inlining virtual and interface calls."" It now works thanks to: - https://android-review.googlesource.com/#/c/154016/ where the invoke type is changed. - The new FindMethodIndexIn method in this change, that locates the right method index relative to the caller's dex file. This reverts commit 6e4758615308bb525b6350c30468e33a2e1f2274. Change-Id: Iddba11664a9241e210fec211cd2aed9f4b90d118
|
3507105caea0d209c66a95d5ec5d739949105c5d |
|
09-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Add support for inlining already sharpened interface calls. Change-Id: Ia6b557c5e98e493b187b1f30da0c62449d9dd4d4
|
6e4758615308bb525b6350c30468e33a2e1f2274 |
|
08-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Support for inlining virtual and interface calls." Fails for some apps. bug: 21674542 This reverts commit 1d5006c34d75758752bf3499892e3d5beb11d5dc. Change-Id: Ia74b5e54d59f8ffe9992591324a12f71efb67af4
|
1d5006c34d75758752bf3499892e3d5beb11d5dc |
|
03-Jun-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Support for inlining virtual and interface calls. Also had to change the pass order to get reference type propagation before the inliner. Change-Id: I4bf3bbb2d17c7d9cab632cfdd96adad8368bdfea
|
3d21bdf8894e780d349c481e5c9e29fe1556051c |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
|
e401d146407d61eeb99f8d6176b2ac13c4df1e33 |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move mirror::ArtMethod to native Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
|
d23eeef3492b53102eb8093524cf37e2b4c296db |
|
18-May-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Support for inlining methods that call/throw. Mostly fixes here and there to make it working. Change-Id: I1b535e895105d78b65634636d675b818551f783e
|
9437b78780f9e6ffa5797ebe82de8e8d7f3a5ed6 |
|
25-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Revert "Inline across dex files."" This reverts commit 6a816cf624ba56bf2872916d7b65b18fd9a411ef. Change-Id: I36cb524108786dd7996f2aea0443675be1f1b859
|
6a816cf624ba56bf2872916d7b65b18fd9a411ef |
|
24-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Revert "Inline across dex files." bug: 19904089 bug: 19903495 This reverts commit 7e4c3508e4f5512650b63c41f7872a749e99aee9. Change-Id: I15df746b5f1882cce78eedde6c05c0d3b69bfa4a
|
7e4c3508e4f5512650b63c41f7872a749e99aee9 |
|
18-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Inline across dex files. Change-Id: I5c2c44f5130b50f0bad21a6877a3935dc60b4a85
|
c0365b144651c4e586ddc235423b3f0111966f89 |
|
18-Mar-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Remember whether a method was worth inlining. Change-Id: I9d8efe312b264739ac6307f966e43c1d7650a3ca
|
7c3952f423b8213083d60596a5f0bf4237ca3f7b |
|
20-Feb-2015 |
Andreas Gampe <agampe@google.com> |
ART: Add -Wunused Until the global CFLAGS are fixed, add Wunused. Fix declarations in the optimizing compiler. Change-Id: Ic4553f08e809dc54f3d82af57ac592622c98e000
|
acf735c13998ad2a175f5a17e7bfce220073279d |
|
12-Feb-2015 |
Calin Juravle <calin@google.com> |
Reference type propagation - propagate reference types between instructions - remove checked casts when possible - add StackHandleScopeCollection to manage an arbitrary number of stack handles (see comments) Change-Id: I31200067c5e7375a5ea8e2f873c4374ebdb5ee60
|
ef87c5db0443fc4daa960042313a35352743430e |
|
30-Jan-2015 |
Nicolas Geoffray <ngeoffray@google.com> |
Allow nested inlining. Also run optimizations before iterating over the instructions to get rid of, e.g., null checks. Change-Id: I6e52e61ce4d0ccb63d687afea09bb4722453bb6a
|
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
|