summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bug in optimizing when the null constant has been DCE.Nicolas Geoffray2015-06-171-1/+1
| | | | | | | | | | | | If it has been DCE, we should create a new one, instead of using the old one. Also move the first DCE to a place where it could actually be useful. bug:21870788 Change-Id: I28fc52ae481ef92cba45fc1b5abcf07c995f524c
* Optimizing: Move optimization objects to Arena.Vladimir Marko2015-06-121-37/+43
| | | | | | | | | | | | | This should reduce the stack size needed by the OptimizingCompiler::CompileOptimized() which was very close to our limits for clang builds, causing repeated build breakages on otherwise healthy changes: art/compiler/optimizing/optimizing_compiler.cc:395:37: error: stack frame size of 1760 bytes in function 'art::OptimizingCompiler::CompileOptimized' [-Werror,-Wframe-larger-than=] Change-Id: I2f4ab0235f4eac61823a4a320bb4fe78942a23c2
* Revert "Revert "Support for inlining virtual and interface calls.""Nicolas Geoffray2015-06-101-3/+9
| | | | | | | | | | | | | 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
* Revert "Support for inlining virtual and interface calls."Nicolas Geoffray2015-06-081-9/+3
| | | | | | | | | | Fails for some apps. bug: 21674542 This reverts commit 1d5006c34d75758752bf3499892e3d5beb11d5dc. Change-Id: Ia74b5e54d59f8ffe9992591324a12f71efb67af4
* Support for inlining virtual and interface calls.Nicolas Geoffray2015-06-041-3/+9
| | | | | | | Also had to change the pass order to get reference type propagation before the inliner. Change-Id: I4bf3bbb2d17c7d9cab632cfdd96adad8368bdfea
* Move mirror::ArtMethod to nativeMathieu Chartier2015-05-291-4/+4
| | | | | | | | | | | | | 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
* Add --generate-debug-info flag and remove the other two flags.David Srbecky2015-05-281-3/+3
| | | | | | | | | | | | | | Replace the flags --include-debug-symbols and --include-cfi with single flag called --generate-debug-info (with alias -g). The name "symbol" was not ideal, since depending on context it may be interpreted as "ELF symbols", or "debugging information". This CL also means that we have only the options to include either all debugging information or none. This should be fine, since we can use standard tools to strip anything we do not want. Change-Id: I721fded56d755d7eed0ef36aa84e841a1f5747f8
* Do not use dex_compilation_unit after inlining.Nicolas Geoffray2015-05-221-7/+3
| | | | | | | It's incompatible with inlining, as inlined invokes/load class/new can be from another dex file. Change-Id: I8897b6a012942bc8e136f2bea70252d3fb3a7fa5
* Also encode the InvokeType in an InlineInfo.Nicolas Geoffray2015-05-211-1/+1
| | | | | | This will be needed to recover the call stack. Change-Id: I2fe10785eb1167939c8cce1862b2d7f4066e16ec
* Eliminate redundant constructor barriers when inlining.Calin Juravle2015-05-191-1/+6
| | | | | Bug: 20410297 Change-Id: I2097743d00eb795d050d390b1918e38c7f41d506
* ART: Rediscover loops after deleting blocks in DCEDavid Brazdil2015-05-121-2/+4
| | | | | | | | The way DCE currently updates loop information does not cover all cases. This patch removes the logic, resets loop information of live blocks to pre-SSA state and reanalyzes the affected loops. Change-Id: I0b996a70235b95a8db0de9a23a03f71db57a21b8
* Add a parent environment to HEnvironment.Nicolas Geoffray2015-05-111-1/+1
| | | | | | | This code has no functionality change. It adds a placeholder for chaining inlined frames. Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
* Merge "Minor improvements to 458-checker-instruction-simplification."Roland Levillain2015-04-241-1/+1
|\
| * Minor improvements to 458-checker-instruction-simplification.Alexandre Rames2015-04-201-1/+1
| | | | | | | | | | | | | | | | | | This follows earlier comments from Roland: https://android-review.googlesource.com/#/c/140446 /2/test/458-checker-instruction-simplification/src/Main.java@337 /2/test/458-checker-instruction-simplification/src/Main.java@465 Change-Id: I255ab74b8885dd8e86bb2c11bba4075fa0eaa183
* | ART: Run BooleanSimplifier after inliningDavid Brazdil2015-04-231-3/+3
| | | | | | | | | | | | Inlined methods are currently not simplified. Change-Id: I075130c9df55e2f55032a2c81b08d42cb2cc01f6
* | [optimizing] Name the last DCE pass.Calin Juravle2015-04-221-1/+1
| | | | | | | | | | | | This will allow Checker to differentiate between them. Change-Id: I972d452a64f1c19d370567b9ef3d620f9b835a9a
* | Run DCE again after all the other optimizations have run.Calin Juravle2015-04-221-3/+5
| | | | | | | | On docs this doubles the amount of instructions removed.
* | Revert "Run DCE again after all the other optimizations have run."Nicolas Geoffray2015-04-211-5/+3
| | | | | | | | | | | | | | | | Reverting because of libcore failures. This reverts commit 7a9c885684c965fe84f91d8ad74f54f869e2a448. Change-Id: Iafe59b02fe7617243d81533d66e609a3528e7a58
* | Run DCE again after all the other optimizations have run.Calin Juravle2015-04-211-3/+5
| | | | | | | | | | | | On docs this doubles the amount of instructions removed. Change-Id: I1712a92c0c0b3b32b111d194b64d8ea81d652822
* | Use --dump-stats to dump optimizing compiler stats.Calin Juravle2015-04-211-19/+29
|/ | | | | | | VLOG(compiler) produces too much output and it takes a long time if you only need to see how an analysis performs. Change-Id: Ic17c2b2b5fec431d356cecd37289fb96985d4d7f
* Merge "Fallback to quick in case of soft verification errors"Calin Juravle2015-04-161-5/+18
|\
| * Fallback to quick in case of soft verification errorsCalin Juravle2015-04-161-5/+18
| | | | | | | | | | | | | | | | | | | | Add a regression test: using uninitialized values triggers a soft verification error and optimizing should not crash. Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the bug report. Bug: 19988704 Change-Id: I67174538eed853baff735694b3ae8eb34afe2a39
* | Move the linear order to the HGraph.Nicolas Geoffray2015-04-151-1/+1
|/ | | | | | | | | Bug found by Zheng Xu: SsaLivenessAnalysis being a stack allocated object, we should not refer to it in later phases of the compiler. Specifically, the code generator was using the linear order, which was stored in the liveness analysis object. Change-Id: I574641f522b7b86fc43f3914166108efc72edb3b
* Add --include-cfi compiler option.David Srbecky2015-04-131-1/+1
| | | | | | | | | | | | Decouple generation of CFI from the rest of debug symbols. This makes it possible to generate oat with CFI but without the rest of debug symbols. This is in line with intention of the .eh_frame section. The section does not have the .debug_ prefix because it is considered somewhat different to the rest of debug symbols. Change-Id: I32816ecd4f30ac4e0dc69d69a4993e349c737f96
* Merge "Revert "Fallback to quick in case of soft verification errors""Calin Juravle2015-04-131-18/+5
|\
| * Revert "Fallback to quick in case of soft verification errors"Calin Juravle2015-04-131-18/+5
| | | | | | | | | | | | This reverts commit c751d37e692d89b360f3c09421401f581b5c6d06. Change-Id: I2183df8e856410989bc019f6a1f58af37d5d7eab
* | Merge "Fallback to quick in case of soft verification errors"Calin Juravle2015-04-131-5/+18
|\|
| * Fallback to quick in case of soft verification errorsCalin Juravle2015-04-101-5/+18
| | | | | | | | | | | | | | | | | | | | | | Add a regression test: using uninitialized values triggers a soft verification error and optimizing should not crash. Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the bug report. Bug: 19988704 Change-Id: I2493f737efd3fad72f6b41fb60eff1d3731613fb
* | Merge "ART: Refactor CompileOptimized"Andreas Gampe2015-04-101-15/+15
|\ \
| * | ART: Refactor CompileOptimizedAndreas Gampe2015-04-101-15/+15
| |/ | | | | | | | | | | | | | | | | Factor out register allocation. Both Clang and GCC inline the function, but it changes how Clang stack-allocates enough so that the resulting frame size is below our limit. Bug: 20139216 Change-Id: I2cf393aed70f2ce0556252b61ae639aacab6f3a7
* / ART: Remove WriteElf from CompilerAndreas Gampe2015-04-101-14/+0
|/ | | | | | | | As Portable is gone, we only have one elf_writer left. It also allows to put the decision for 32b vs 64b ELF into a central point. Change-Id: Iae67d06df85268b3f0ee5725abc65edd23eb2499
* Fix build - the stack frame is too large.David Srbecky2015-04-091-0/+4
| | | | Change-Id: Icabad2e3ccbaa4783df6c18c60a206357398edc5
* Implement CFI for Optimizing.David Srbecky2015-04-091-5/+21
| | | | | | CFI is necessary for stack unwinding in gdb, lldb, and libunwind. Change-Id: I1a3480e3a4a99f48bf7e6e63c4e83a80cfee40a2
* Merge "ART: Fix 64-bit ELF file support"Andreas Gampe2015-04-081-2/+7
|\
| * ART: Fix 64-bit ELF file supportAndreas Gampe2015-04-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | The API wasn't cross-compile-safe, 32-bit patchoat would fail for negative delta applied to a 64-bit ELF file. Add 64-bit ELF file output to the compilers, behind a flag, currently off by default (preserving current behavior). Bug: 20095017 Change-Id: I2cde7b4c7cc83413c76692d7b745868d644a604c
* | ART: Print C1vis header only if visualizer enabledDavid Brazdil2015-04-071-1/+4
|/ | | | | | | Setting kStringFilter currently suppresses graph dumps of non-matching methods but their headers are still printed. This fixes the issue. Change-Id: Ib33fb20fcca2bf409534a824e7f76f1feb85724d
* Merge "Fixed layout for dex caches in boot image."Vladimir Marko2015-03-311-0/+2
|\
| * Fixed layout for dex caches in boot image.Vladimir Marko2015-03-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define a fixed layout for dex cache arrays (type, method, string and field arrays) for dex caches in the boot image. This gives those arrays fixed offsets from the boot image code and allows PC-relative addressing of their elements. Use the PC-relative load on arm64 for relevant instructions, i.e. invoke-static, invoke-direct, const-string, const-class, check-cast and instance-of. This reduces the arm64 boot.oat on Nexus 9 by 1.1MiB. This CL provides the infrastructure and shows on the arm64 the gains that we can achieve by having fixed dex cache arrays' layout. To fully use this for the boot images, we need to implement the PC-relative addressing for other architectures. To achieve similar gains for apps, we need to move the dex cache arrays to a .bss section of the oat file. These changes will be implemented in subsequent CLs. (Also remove some compiler_driver.h dependencies to reduce incremental build times.) Change-Id: Ib1859fa4452d01d983fd92ae22b611f45a85d69b
* | [optimizing] Only print full stats in VLOG(compiler)Nicolas Geoffray2015-03-301-2/+7
|/ | | | | | | | Also add a kCompiledQuick stat. bug:19956318 Change-Id: I0c6c0ac256362824eb9f1418216ab7e2c289a17b
* Revert "Revert "Inline across dex files.""Nicolas Geoffray2015-03-251-1/+1
| | | | | | This reverts commit 6a816cf624ba56bf2872916d7b65b18fd9a411ef. Change-Id: I36cb524108786dd7996f2aea0443675be1f1b859
* Merge "Share the runtime arena for faster compile times."Nicolas Geoffray2015-03-241-2/+1
|\
| * Share the runtime arena for faster compile times.Nicolas Geoffray2015-03-241-2/+1
| | | | | | | | | | | | | | | | Using a shared arena has the downside of getting more contentions when requesting memory, but saves on compilation times because we don't free the memory it allocated util the end of dex2oat. Change-Id: I353ced1db34539850ec639b6b228451b455a48ec
* | ART: Boolean simplifierDavid Brazdil2015-03-241-0/+5
|/ | | | | | | | | | | | | The optimization recognizes the negation pattern generated by 'javac' and replaces it with a single condition. To this end, boolean values are now consistently assumed to be represented by an integer. This is a first optimization which deletes blocks from the HGraph and does so by replacing the corresponding entries with null. Hence, existing code can continue indexing the list of blocks with the block ID, but must check for null when iterating over the list. Change-Id: I7779da69cfa925c6521938ad0bcc11bc52335583
* Implement a space filter for optimizing.Nicolas Geoffray2015-03-231-0/+10
| | | | | | Heuristic-based. Currently only for enabling fugu user build. Change-Id: I76e652bd3f00ed84a2a8ad69c7c2c0e24d74cd68
* Fall back to Quick when Optimizing cannot compile.Nicolas Geoffray2015-03-171-32/+66
| | | | | | | Currently applies when seeing unresolved types/methods/fields, and methods with try/catch. Change-Id: I93b12d440b39f0b9faf98f08f2bfddedfeff7182
* [optimizing] Use baseline when debuggable is set.Nicolas Geoffray2015-03-161-2/+3
| | | | | | | | | SSA form conflicts with JDWP's SetValue functionality. Because we do not deopt all the call stack, we may call SetValue on a compiled frame, which doesn't work with optimizing. Simplest solution for now is to just use baseline. Change-Id: I91738b363eec8fef145486bd96681aea73a1baa8
* Revert "Revert "[optimizing] Enable x86 long support.""Nicolas Geoffray2015-03-111-1/+1
| | | | | | This reverts commit 154552e666347d41d95d7619c6ee56249ff4feca. Change-Id: Idc726551c249a888b7ff5fde8508ae50e81b2e13
* Make the SSA builder honor the debuggable flag.Nicolas Geoffray2015-03-101-5/+2
| | | | | | | | | | | This requires to properly type phis that are only used by environments, and discard phis with incomptable types. The code generators do not handle these conflicting types. In the process, ensure a phi has a type that does not depend on the order of the inputs (for example (char, short) -> short), and set int for int-like types. We can refine this later. Change-Id: I60ab601d6d00b1cbf18623ee4ff1795aa28f84a1
* Revert "[optimizing] Enable x86 long support."Nicolas Geoffray2015-03-061-1/+1
| | | | | | | | Few libcore failures. This reverts commit b4ba354cf8d22b261205494875cc014f18587b50. Change-Id: I4a28d853e730dff9b69aec9555505803cf2fcd63
* [optimizing] Enable x86 long support.Nicolas Geoffray2015-03-061-1/+1
| | | | Change-Id: I9006972a65a1f191c45691104a960366747f9d16