summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* ART: Enable all optimizations except LSE under try/catchDavid Brazdil2015-12-081-40/+20
| | | | | | | | | Dynamic BCE now updates try/catch information during basic block manipulation and can be enabled. The last missing optimization is LSE. This patch removes all special-casing from optimizing_compiler.cc and bails inside LSE instead. Change-Id: Ie0c6fde7295880ea55d35571455a617fce2b7580
* Inline monomorphic calls.Nicolas Geoffray2015-12-041-2/+3
| | | | Change-Id: If38171c2dc7d4a4378df5d050afc4fff4499c98f
* Merge "Clean up optimizing compiler stats"Calin Juravle2015-12-021-4/+2
|\
| * Clean up optimizing compiler statsCalin Juravle2015-12-011-4/+2
| | | | | | | | | | | | | | | | - removed unused stats. - add 'OptStat' prefix to the names of the printed stats to make them `grep` friendly. Change-Id: I189e98b5226465c88c4a00247cd0b9b2ddb6d66e
* | Dynamic BCE (based on induction range analysis)Aart Bik2015-12-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale: A rewritten dynamic BCE that uses induction variable analysis to generate the run-time tests before a loop in order to eliminate bounds-checks from its body. This CL removes now obsoleted induction related code inside the BCE module. Also, the dynamic test generation is placed more strategically, since we missed a few cases where static analysis does better. Most significant performance improvements (filtering noise) is about: Linpack +20% LU > +10% Change-Id: I03d7631857154b6a131b132f26a2dc568af1b3a1
* | Merge "Optimizing/ARM: Implement kDexCachePcRelative dispatch."Vladimir Marko2015-12-011-0/+15
|\ \
| * | Optimizing/ARM: Implement kDexCachePcRelative dispatch.Vladimir Marko2015-12-011-0/+15
| | | | | | | | | | | | Change-Id: I0fe2da50a30a3f62bec8ea01688dd1fec84b1831
* | | ARM64 read barrier support for concurrent GC in Optimizing.Roland Levillain2015-11-241-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This first implementation uses slow paths to instrument heap reference loads and GC root loads for the concurrent copying collector, respectively calling the artReadBarrierSlow and artReadBarrierForRootSlow runtime entry points. Notes: - This implementation does not instrument HInvokeVirtual nor HInvokeInterface instructions (for class reference loads), as the corresponding read barriers are not stricly required with the current concurrent copying collector. - Intrinsics which may eventually call (on slow path) are disabled when read barriers are enabled, as the current slow path infrastructure does not support this case. - When read barriers are enabled, the code generated for a HArraySet instruction always go into the array set slow path for object arrays (delegating the operation to the runtime), as we are lacking a mechanism to keep a temporary register live accross a runtime call (needed for the instrumentation of type checking code, which requires two successive read barriers). Bug: 12687968 Change-Id: Icfb74f67bf23ae80e7723ee6a0c9ff34ba325d48
* | Optimizing: Avoid a PrettyMethod() call per compiled method.Vladimir Marko2015-11-231-12/+19
| | | | | | | | | | | | | | PrettyMethod() is expensive so avoid it unless it's actually needed. Change-Id: I06ab29cc18e426b7dfb8c53b163757c88b53c27f
* | Revert "Add stats support for existing optimizations"Nicolas Geoffray2015-11-231-4/+4
| | | | | | | | | | | | | | | | Breaks the build. Please ensure your changes build. This reverts commit 06241b1b07fb031b7d2cf55f4b78d3444d07cc2d. Change-Id: I68b18f99a9882719bf6654d3313531a7965b8483
* | Add stats support for existing optimizationsJean-Philippe Halimi2015-11-221-4/+4
| | | | | | | | | | | | | | | | This patch adds support for the --dump-stats facility with existing optimizations. Change-Id: I68751b119a030952a11057cb651a3c63e87e73ea Signed-off-by: Jean-Philippe Halimi <jean-philippe.halimi@intel.com>
* | Revert "Dynamic BCE (based on induction range analysis)"Aart Bik2015-11-211-3/+1
| | | | | | | | | | | | | | | | This reverts commit 0b5849be045c5683d4a6b6b6c306abadba5f0fcc. Change-Id: Id33f5da42bbdfb1aff7e2281417c8a7aa492df05 Rationale: so close :-( but bullhead-userdebug (linux) build in git_mnc-dr-dev-plus-aosp reported a breakage with a type inconsistency (long vs int in probably the codegen of dynamic bce); no time to investigate and fix this fully before my trip, so rolling back for now
* | Dynamic BCE (based on induction range analysis)Aart Bik2015-11-201-1/+3
|/ | | | | | | | | | | | | | | Rationale: A rewritten dynamic BCE that uses induction variable analysis to generate the run-time tests before a loop in order to eliminate bounds-checks from its body. This CL removes now obsoleted induction related code inside the BCE module. Also, the dynamic test generation is placed more strategically, since we missed a few cases where static analysis does better. Most significant performance improvements (after filtering noise) is about: Linpack +20% LU > +10% Change-Id: I4e7b8bab0288beff6f98a14856e3536103d32742
* ARM read barrier support for concurrent GC in Optimizing.Roland Levillain2015-11-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This first implementation uses slow paths to instrument heap reference loads and GC root loads for the concurrent copying collector, respectively calling the artReadBarrierSlow and artReadBarrierForRootSlow runtime entry points. Notes: - This implementation does not instrument HInvokeVirtual nor HInvokeInterface instructions (for class reference loads), as the corresponding read barriers are not stricly required with the current concurrent copying collector. - Intrinsics which may eventually call (on slow path) are disabled when read barriers are enabled, as the current slow path infrastructure does not support this case. - When read barriers are enabled, the code generated for a HArraySet instruction always go into the array set slow path for object arrays (delegating the operation to the runtime), as we are lacking a mechanism to keep a temporary register live accross a runtime call (needed for the instrumentation of type checking code, which requires two successive read barriers). Bug: 12687968 Change-Id: I92e8db414d029f952c07f3d3a98069e46dfdbc2a
* x86/x86-64 read barrier support for concurrent GC in Optimizing.Roland Levillain2015-11-151-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This first implementation uses slow paths to instrument heap reference loads and GC root loads for the concurrent copying collector, respectively calling the artReadBarrierSlow and artReadBarrierForRootSlow (new) runtime entry points. Notes: - This implementation does not instrument HInvokeVirtual nor HInvokeInterface instructions (for class reference loads), as the corresponding read barriers are not stricly required with the current concurrent copying collector. - Intrinsics which may eventually call (on slow path) are disabled when read barriers are enabled, as the current slow path infrastructure does not support this case. - When read barriers are enabled, the code generated for a HArraySet instruction always go into the array set slow path for object arrays (delegating the operation to the runtime), as we are lacking a mechanism to keep a temporary register live accross a runtime call (needed for the instrumentation of type checking code, which requires two successive read barriers). Bug: 12687968 Change-Id: I14cd6107233c326389120336f93955b28ffbb329
* Merge "Optimizing/X86: PC-relative dex cache array addressing."Vladimir Marko2015-11-121-4/+3
|\
| * Optimizing/X86: PC-relative dex cache array addressing.Vladimir Marko2015-11-121-4/+3
| | | | | | | | | | | | | | | | Add PC-relative dex cache array addressing for X86 and use it for better invoke-static/-direct dispatch. Also delay the initialization to the PC-relative base until needed. Change-Id: Ib8634d5edce4920cd70172fd13211809cf6948d1
* | Revert "Revert "Run type propagation after inliner only when needed.""Calin Juravle2015-11-111-13/+2
| | | | | | | | | | | | This reverts commit 271743601650308c7ac5c7a3ec35025d8130a298. Change-Id: I173e27a0a4d7d54f90ca459eb48d280d1d40ab70
* | Revert "Revert "ART: Update DCE to work with try/catch""David Brazdil2015-11-101-0/+1
|/ | | | | | | | | | | The previous CL failed because it did not update inputs of catch phis. Since phi input indices cannot be easily mapped back to throwing instructions, this new implementation at least removes catch phi uses of values defined in the removed blocks to preserve graph consistency. This reverts commit fb552d7061746f7a90fdd5002696e255e2e15c35. Change-Id: I63d95915d1ef50e71d3bcf0cd10aaded554035b4
* Code cleanup to avoid CompilerDriver abstractions in JIT.Nicolas Geoffray2015-11-051-152/+194
| | | | | | Avoids allocating a CompiledMethod. Change-Id: I35b4aa0d7c74daba68e827a01e71c300fce3b3bf
* ART: Enable inlining under try/catchDavid Brazdil2015-10-301-2/+2
| | | | | | | | | This patch updates the inliner to set try/catch information when inlining into a method with try/catch. It does not yet allow inlining of methods with try/catch because that will require generating catch stack maps with inline info. Change-Id: I7d57e1454e7da537d75c5c7eda60b22f3a30fa60
* Revert "ART: Enable more passes under try/catch"David Brazdil2015-10-291-22/+34
| | | | | | | | | BCE does not set TryCatchInformation when creating new blocks. Will be fixed with DynamicBCE CL. This reverts commit 39fabd6bb6fcf7a712b370d3b6fd0ada83e2e5d8. Change-Id: I76ae707ac132bb1a4a9f64f4916ffcd786ef730c
* ART: Enable more passes under try/catchDavid Brazdil2015-10-291-34/+22
| | | | | | | LICM, BCE, LSE are all safe under try/catch. Inliner and DCE need updating and will be enabled in follow-up CLs. Change-Id: I86db5f811257d5e765fea91666a2a2af0fb24ec3
* Merge "Reduce memory used by CompiledMethods."Vladimir Marko2015-10-271-2/+2
|\
| * Reduce memory used by CompiledMethods.Vladimir Marko2015-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use LengthPrefixedArray<>s instead of SwapVector<>s to store CompiledMethod data and get rid of the unnecessary members of CompiledMethod to reduce dex2oat memory usage. Refactor the deduplication from CompilerDriver to a new class. Use HashSet<> instead of std::set<> for the DedupeSet<> to further decrease the memory usage and improve performance. This reduces the dex2oat memory usage when compiling boot image on Nexus 5 (with Optimizing, -j1) by ~6.75MiB (5%). This also reduces the compile time by ~2.2% (~1.6% dex2oat time; with Optimizing, without -j). Change-Id: I974f1f5e58350de2bf487a2bca3907fa05fb80ea
* | Merge "Optimizing: Determine invoke-static/-direct dispatch early."Vladimir Marko2015-10-271-4/+14
|\ \ | |/ |/|
| * Optimizing: Determine invoke-static/-direct dispatch early.Vladimir Marko2015-10-231-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Revert "Run type propagation after inliner only when needed.""Calin Juravle2015-10-261-2/+12
|\ \
| * | Revert "Run type propagation after inliner only when needed."Calin Juravle2015-10-261-2/+12
| | | | | | | | | | | | | | | | | | This reverts commit 4e5dd521063beae1706410419f19c7e224db50fe. Change-Id: I0de261d14dd3f71abe05f9bc71744820cf23b937
* | | Merge "Run type propagation after inliner only when needed."Calin Juravle2015-10-261-12/+2
|\| |
| * | Run type propagation after inliner only when needed.Calin Juravle2015-10-231-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently we run a type propagation pass unconditionally after the inliner. This change looks at the returned value (if any) and runs a minimal type propagation only if its type has changed. Change-Id: I0dd72bd481219081e8a978d2632426afc980d73a
* | | Revert "Revert "load store elimination.""Mingyao Yang2015-10-221-0/+3
| |/ |/| | | | | | | | | This reverts commit 8030c4100d2586fac39ed4007c61ee91d4ea4f25. Change-Id: I79558d85484be5f5d04e4a44bea7201fece440f0
* | MIPS: Initial version of optimizing compiler for MIPS32Goran Jakovljevic2015-10-221-0/+1
|/ | | | Change-Id: I370388e8d5de52c7001552b513877ef5833aa621
* Merge "Use DlMallocSpace for the JIT code cache."Nicolas Geoffray2015-10-211-10/+18
|\
| * Use DlMallocSpace for the JIT code cache.Nicolas Geoffray2015-10-211-10/+18
| | | | | | | | | | | | | | - Also tidy up some code in the JIT compiler. - And mprotect code space to be writable only when allocating. Change-Id: I46ea5c029aec489f2af63452de31db3736aebc20
* | Use ATTRIBUTE_UNUSED more.Roland Levillain2015-10-151-1/+0
| | | | | | | | | | | | Use it in lieu of UNUSED(), which had some incorrect uses. Change-Id: If247dce58b72056f6eea84968e7196f0b5bef4da
* | Revert "load store elimination."Nicolas Geoffray2015-10-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Breaks libcore tests: libcore.java.lang.ref.FinalizeTest#testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline libcore.java.util.ResourceLeakageDetectorTest#testDetectsUnclosedCloseGuard org.apache.harmony.tests.java.lang.ref.ReferenceTest#test_finalizeReferenceInteraction This reverts commit 589dac7f0ce078d19aad7e35bb0195c47ddf01d2. Change-Id: I55115765c10762d5bc152d3425e4622560d8b9f4
* | load store elimination.Mingyao Yang2015-10-151-0/+3
|/ | | | | | | | | This adds a pass to eliminate some unnecessary heap loads/stores. It first collects heap locations and then tracks values stored to those heap locations. Alias analysis is done based on offset, type, singleton, pre-existence, etc. Change-Id: I11a9d8ef20d1b2f245607eb25118e9aff9be472a
* Optimizing: Move GraphChecker memory allocations to arena.Vladimir Marko2015-10-121-2/+2
| | | | | Bug: 18120045 Change-Id: I3934158e6ea4868d9baa1dfcc53b603ca6c521e2
* Don't check for optimizing test marker on unsupported ISAs.Calin Juravle2015-10-091-2/+6
| | | | Change-Id: I39b31e770f4a9f1f5806cc4b28009e2f1908ad43
* Enforce optimizing test marker for verification errors.Calin Juravle2015-10-071-6/+8
| | | | Change-Id: Ie7babf162729fa02d285572ee043fa9e588d73cc
* Revert "Optimizing: Disable -Wframe-larger-than= for CompileOptimized()."Vladimir Marko2015-10-061-4/+2
| | | | | | | | | | | Instead, prevent inlining of AllocateRegisters() that uses huge stack-allocated objects. Bug: 24698147 This reverts commit 67f784e63343db5ecd6e584343484684ea60d1f8. Change-Id: I94c408f7acf6e43897a248d9ea0761b979ed00c8
* Optimizing: Disable -Wframe-larger-than= for CompileOptimized().Vladimir Marko2015-10-061-0/+4
| | | | | Bug: 24698147 Change-Id: I360e9412d85afa83ef2152e4c16bcd3139b34f75
* Don't delegate to Quick anymore.Nicolas Geoffray2015-10-021-18/+2
| | | | Change-Id: I81ffd83daec7be03a796903f40b8bbdcd63c34c7
* Enable compilation of members with access check failures.Calin Juravle2015-10-021-3/+7
| | | | Change-Id: I0de73099b53612072c3e6f1235c22f96339fe440
* Revert "Revert "Enable optimizations with --debuggable.""Nicolas Geoffray2015-09-301-8/+1
| | | | | | This reverts commit b7d27a53cb280a943c0a63a9e0806cf8e3ae4cde. Change-Id: I398c23863e4fd86a3112076417378d22efd08306
* Revert "Enable optimizations with --debuggable."Nicolas Geoffray2015-09-291-1/+8
| | | | | | | | Build error with gcc. This reverts commit 43855ccb01703b188777fe59e1110e6a23803171. Change-Id: I45abc7ee0943b2ad7bd644c88858891fc7a38ead
* Enable optimizations with --debuggable.Nicolas Geoffray2015-09-291-8/+1
| | | | Change-Id: I8979e59ee081222687fda1c93ac0bf3acbbad936
* Support unresolved methods in OptimizingCalin Juravle2015-09-171-2/+10
| | | | Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1
* Merge "Add option to append to the cfg dump."Calin Juravle2015-09-161-1/+3
|\