summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
AgeCommit message (Collapse)Author
2015-12-08ART: Enable all optimizations except LSE under try/catchDavid Brazdil
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
2015-12-04Inline monomorphic calls.Nicolas Geoffray
Change-Id: If38171c2dc7d4a4378df5d050afc4fff4499c98f
2015-12-02Merge "Clean up optimizing compiler stats"Calin Juravle
2015-12-01Dynamic BCE (based on induction range analysis)Aart Bik
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
2015-12-01Clean up optimizing compiler statsCalin Juravle
- removed unused stats. - add 'OptStat' prefix to the names of the printed stats to make them `grep` friendly. Change-Id: I189e98b5226465c88c4a00247cd0b9b2ddb6d66e
2015-12-01Merge "Optimizing/ARM: Implement kDexCachePcRelative dispatch."Vladimir Marko
2015-12-01Optimizing/ARM: Implement kDexCachePcRelative dispatch.Vladimir Marko
Change-Id: I0fe2da50a30a3f62bec8ea01688dd1fec84b1831
2015-11-24ARM64 read barrier support for concurrent GC in Optimizing.Roland Levillain
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
2015-11-23Optimizing: Avoid a PrettyMethod() call per compiled method.Vladimir Marko
PrettyMethod() is expensive so avoid it unless it's actually needed. Change-Id: I06ab29cc18e426b7dfb8c53b163757c88b53c27f
2015-11-23Revert "Add stats support for existing optimizations"Nicolas Geoffray
Breaks the build. Please ensure your changes build. This reverts commit 06241b1b07fb031b7d2cf55f4b78d3444d07cc2d. Change-Id: I68b18f99a9882719bf6654d3313531a7965b8483
2015-11-22Add stats support for existing optimizationsJean-Philippe Halimi
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>
2015-11-21Revert "Dynamic BCE (based on induction range analysis)"Aart Bik
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
2015-11-20Dynamic BCE (based on induction range analysis)Aart Bik
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
2015-11-17ARM read barrier support for concurrent GC in Optimizing.Roland Levillain
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
2015-11-15x86/x86-64 read barrier support for concurrent GC in Optimizing.Roland Levillain
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
2015-11-12Merge "Optimizing/X86: PC-relative dex cache array addressing."Vladimir Marko
2015-11-12Optimizing/X86: PC-relative dex cache array addressing.Vladimir Marko
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
2015-11-11Revert "Revert "Run type propagation after inliner only when needed.""Calin Juravle
This reverts commit 271743601650308c7ac5c7a3ec35025d8130a298. Change-Id: I173e27a0a4d7d54f90ca459eb48d280d1d40ab70
2015-11-10Revert "Revert "ART: Update DCE to work with try/catch""David Brazdil
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
2015-11-05Code cleanup to avoid CompilerDriver abstractions in JIT.Nicolas Geoffray
Avoids allocating a CompiledMethod. Change-Id: I35b4aa0d7c74daba68e827a01e71c300fce3b3bf
2015-10-30ART: Enable inlining under try/catchDavid Brazdil
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
2015-10-29Revert "ART: Enable more passes under try/catch"David Brazdil
BCE does not set TryCatchInformation when creating new blocks. Will be fixed with DynamicBCE CL. This reverts commit 39fabd6bb6fcf7a712b370d3b6fd0ada83e2e5d8. Change-Id: I76ae707ac132bb1a4a9f64f4916ffcd786ef730c
2015-10-29ART: Enable more passes under try/catchDavid Brazdil
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
2015-10-27Merge "Reduce memory used by CompiledMethods."Vladimir Marko
2015-10-27Reduce memory used by CompiledMethods.Vladimir Marko
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
2015-10-27Merge "Optimizing: Determine invoke-static/-direct dispatch early."Vladimir Marko
2015-10-26Merge "Revert "Run type propagation after inliner only when needed.""Calin Juravle
2015-10-26Revert "Run type propagation after inliner only when needed."Calin Juravle
This reverts commit 4e5dd521063beae1706410419f19c7e224db50fe. Change-Id: I0de261d14dd3f71abe05f9bc71744820cf23b937
2015-10-26Merge "Run type propagation after inliner only when needed."Calin Juravle
2015-10-23Run type propagation after inliner only when needed.Calin Juravle
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
2015-10-23Optimizing: Determine invoke-static/-direct dispatch early.Vladimir Marko
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
2015-10-22Revert "Revert "load store elimination.""Mingyao Yang
This reverts commit 8030c4100d2586fac39ed4007c61ee91d4ea4f25. Change-Id: I79558d85484be5f5d04e4a44bea7201fece440f0
2015-10-22MIPS: Initial version of optimizing compiler for MIPS32Goran Jakovljevic
Change-Id: I370388e8d5de52c7001552b513877ef5833aa621
2015-10-21Merge "Use DlMallocSpace for the JIT code cache."Nicolas Geoffray
2015-10-21Use DlMallocSpace for the JIT code cache.Nicolas Geoffray
- Also tidy up some code in the JIT compiler. - And mprotect code space to be writable only when allocating. Change-Id: I46ea5c029aec489f2af63452de31db3736aebc20
2015-10-15Use ATTRIBUTE_UNUSED more.Roland Levillain
Use it in lieu of UNUSED(), which had some incorrect uses. Change-Id: If247dce58b72056f6eea84968e7196f0b5bef4da
2015-10-15Revert "load store elimination."Nicolas Geoffray
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
2015-10-15load store elimination.Mingyao Yang
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
2015-10-12Optimizing: Move GraphChecker memory allocations to arena.Vladimir Marko
Bug: 18120045 Change-Id: I3934158e6ea4868d9baa1dfcc53b603ca6c521e2
2015-10-09Don't check for optimizing test marker on unsupported ISAs.Calin Juravle
Change-Id: I39b31e770f4a9f1f5806cc4b28009e2f1908ad43
2015-10-07Enforce optimizing test marker for verification errors.Calin Juravle
Change-Id: Ie7babf162729fa02d285572ee043fa9e588d73cc
2015-10-06Revert "Optimizing: Disable -Wframe-larger-than= for CompileOptimized()."Vladimir Marko
Instead, prevent inlining of AllocateRegisters() that uses huge stack-allocated objects. Bug: 24698147 This reverts commit 67f784e63343db5ecd6e584343484684ea60d1f8. Change-Id: I94c408f7acf6e43897a248d9ea0761b979ed00c8
2015-10-06Optimizing: Disable -Wframe-larger-than= for CompileOptimized().Vladimir Marko
Bug: 24698147 Change-Id: I360e9412d85afa83ef2152e4c16bcd3139b34f75
2015-10-02Don't delegate to Quick anymore.Nicolas Geoffray
Change-Id: I81ffd83daec7be03a796903f40b8bbdcd63c34c7
2015-10-02Enable compilation of members with access check failures.Calin Juravle
Change-Id: I0de73099b53612072c3e6f1235c22f96339fe440
2015-09-30Revert "Revert "Enable optimizations with --debuggable.""Nicolas Geoffray
This reverts commit b7d27a53cb280a943c0a63a9e0806cf8e3ae4cde. Change-Id: I398c23863e4fd86a3112076417378d22efd08306
2015-09-29Revert "Enable optimizations with --debuggable."Nicolas Geoffray
Build error with gcc. This reverts commit 43855ccb01703b188777fe59e1110e6a23803171. Change-Id: I45abc7ee0943b2ad7bd644c88858891fc7a38ead
2015-09-29Enable optimizations with --debuggable.Nicolas Geoffray
Change-Id: I8979e59ee081222687fda1c93ac0bf3acbbad936
2015-09-17Support unresolved methods in OptimizingCalin Juravle
Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1
2015-09-16Merge "Add option to append to the cfg dump."Calin Juravle