Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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
|
|
Fails for some apps.
bug: 21674542
This reverts commit 1d5006c34d75758752bf3499892e3d5beb11d5dc.
Change-Id: Ia74b5e54d59f8ffe9992591324a12f71efb67af4
|
|
Also had to change the pass order to get reference type propagation
before the inliner.
Change-Id: I4bf3bbb2d17c7d9cab632cfdd96adad8368bdfea
|
|
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
|
|
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
|
|
It's incompatible with inlining, as inlined invokes/load class/new
can be from another dex file.
Change-Id: I8897b6a012942bc8e136f2bea70252d3fb3a7fa5
|
|
This will be needed to recover the call stack.
Change-Id: I2fe10785eb1167939c8cce1862b2d7f4066e16ec
|
|
Bug: 20410297
Change-Id: I2097743d00eb795d050d390b1918e38c7f41d506
|
|
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
|
|
This code has no functionality change. It adds a placeholder
for chaining inlined frames.
Change-Id: I5ec57335af76ee406052345b947aad98a6a4423a
|
|
|
|
Inlined methods are currently not simplified.
Change-Id: I075130c9df55e2f55032a2c81b08d42cb2cc01f6
|
|
This will allow Checker to differentiate between them.
Change-Id: I972d452a64f1c19d370567b9ef3d620f9b835a9a
|
|
On docs this doubles the amount of instructions removed.
|
|
Reverting because of libcore failures.
This reverts commit 7a9c885684c965fe84f91d8ad74f54f869e2a448.
Change-Id: Iafe59b02fe7617243d81533d66e609a3528e7a58
|
|
On docs this doubles the amount of instructions removed.
Change-Id: I1712a92c0c0b3b32b111d194b64d8ea81d652822
|
|
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
|
|
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
|
|
|
|
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
|
|
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
|
|
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
|
|
|
|
This reverts commit c751d37e692d89b360f3c09421401f581b5c6d06.
Change-Id: I2183df8e856410989bc019f6a1f58af37d5d7eab
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
Change-Id: Icabad2e3ccbaa4783df6c18c60a206357398edc5
|
|
CFI is necessary for stack unwinding in gdb, lldb, and libunwind.
Change-Id: I1a3480e3a4a99f48bf7e6e63c4e83a80cfee40a2
|
|
|
|
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
|
|
Setting kStringFilter currently suppresses graph dumps of non-matching
methods but their headers are still printed. This fixes the issue.
Change-Id: Ib33fb20fcca2bf409534a824e7f76f1feb85724d
|
|
|
|
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
|
|
Also add a kCompiledQuick stat.
bug:19956318
Change-Id: I0c6c0ac256362824eb9f1418216ab7e2c289a17b
|
|
This reverts commit 6a816cf624ba56bf2872916d7b65b18fd9a411ef.
Change-Id: I36cb524108786dd7996f2aea0443675be1f1b859
|
|
|
|
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
|
|
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
|
|
Heuristic-based. Currently only for enabling fugu user build.
Change-Id: I76e652bd3f00ed84a2a8ad69c7c2c0e24d74cd68
|
|
Currently applies when seeing unresolved types/methods/fields,
and methods with try/catch.
Change-Id: I93b12d440b39f0b9faf98f08f2bfddedfeff7182
|
|
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
|
|
This reverts commit 154552e666347d41d95d7619c6ee56249ff4feca.
Change-Id: Idc726551c249a888b7ff5fde8508ae50e81b2e13
|
|
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
|
|
Few libcore failures.
This reverts commit b4ba354cf8d22b261205494875cc014f18587b50.
Change-Id: I4a28d853e730dff9b69aec9555505803cf2fcd63
|
|
Change-Id: I9006972a65a1f191c45691104a960366747f9d16
|