| Age | Commit message (Collapse) | Author |
|
This reverts commit 6a6cca588df43a180534db0b49475a8a5ab4c35a.
This commit extends the VarHandle.get() implementation to work with
reference type fields, not only primitive types.
Test: ART_HEAP_POISONING=true art/test.py --host --32 -r -t 712-varhandle-invocations
Bug: 65872996
Reason for revert: Fix loading the reference field.
Change-Id: Ide1f13fb9c6a4e97876862fb4772e9d543847f1f
|
|
This reverts commit a18ed1bcdb665320c901e1c07b9f92af186077d7.
Reason for revert: Fails 712-varhandle-invocations for art-heap-poisoning and art-read-barrier-heap-poisoning in master-art-host
Change-Id: I703923e2c7b5bc07c2270d0a0328bac8d02b655d
|
|
This commit extends the VarHandle.get() implementation to work with
reference type fields, not only primitive types.
Test: art/test.py --host --32 -r -t 712-varhandle-invocations
Bug: 65872996
Change-Id: I7c0d3487e94ae00d120a5d1167b7a33ffabc6d20
|
|
Create "Phi placeholders" for tracking heap values that can
merge from different values and try to match existing Phis
or create new Phis to replace loads. For Phi placeholders
from loop headers we do not know whether they are fed by
unknown values through back-edges when processing the loop
header, so we delay processing loads that depend on them
until we walked the entire graph. We then try to match them
with existing instructions (when the location is unchanged
in the loop) or Phis or create new Phis if needed. If we
find a loop Phi placeholder fed with unknown value from a
back-edge, we mark the Phi placeholder unreplaceable and
reprocess loads and stores to propagate the unknown value.
This can sometimes allow other loads to be replaced. At the
end we re-calculate the heap values to find stores that can
be eliminated because they write over the same value.
Golem results:
art-opt-cc arm arm64 x86 x86-64
CaffeineFloat +6.7% +3.0% +5.9% +3.8%
KotlinMicroWhen +33.7% +4.8% +1.8% +0.6%
art-opt (more noisy than art-opt-cc)
CaffeineFloat +4.1% +4.4% +7.8% +10.5%
KotlinMicroWhen +33.6% +2.0% +1.8% +1.8%
The MoveLiteralColumn benchmark seems to gain significantly
(up to 22% on art-opt-cc but under 10% on art-opt) but it is
very noisy and the results are therefore unreliable.
Insignificant code size changes for aosp_blueline-userdebug:
- before:
arm boot*.oat: 15303468
arm64 boot*.oat: 18184736
services.odex: 25195944
grep -c pAllocObject boot.arm64.oatdump.txt: 27213
grep -c pAllocArray boot.arm64.oatdump.txt: 3620
- after:
arm boot*.oat: 15299524 (-4KiB, -0.03%)
arm64 boot*.oat: 18176528 (-8KiB, -0.05%)
services.odex: 25191832 (-4KiB, -0.02%)
grep -c pAllocObject boot.arm64.oatdump.txt: 27206 (-7)
grep -c pAllocArray boot.arm64.oatdump.txt: 3615 (-5)
Test: New tests in 530-checker-lse.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: blueline-userdebug boots.
Bug: 77906240
Change-Id: Ia9fe0cd3530f9d3941650dfefc00a7f7fd821994
|
|
If a float or double argument needs to be passed in core
register to a @CriticalNative method due to soft-float
native ABI, insert a fake call to Float.floatToRawIntBits()
or Double.doubleToRawLongBits() to satisfy type checks in
the compiler.
We cannot do that for intrinsics that expect those inputs in
actual FP registers, so we still prevent such intrinsics
from using `kCallCriticalNative`. This should be irrelevant
if an actual intrinsic implementation is emitted. There are
currently two unimplemented intrinsics that are affected by
the carve-out, namely MathRoundDouble and FP16ToHalf, and
four intrinsics implemented only when ARMv8A is supported,
namely MathRint, MathRoundFloat, MathCeil and MathFloor.
Test: testrunner.py --target --32 -t 178-app-image-native-method
Bug: 112189621
Change-Id: Id14ef4f49f8a0e6489f97dc9588c0e6a5c122632
|
|
Bug: 154693569
Test: art/test.py --host -r
Change-Id: Ibdf88397e1c13caf7e333fd4c52bbc75f316bbfb
|
|
Added a comment that clarifies why the ArtMethod object is needed
for HInvokePolymorphic nodes.
Bug: b/65872996
Change-Id: I9dd0451aa29492b17c5963ffb3e9925601262f3b
|
|
This commit prepares the ground for adding VarHandle support
in the compiler. The intrinsic locations builder and code
generator are now triggered for HInvokePolymorphic nodes.
VarHandle and MethodHandle intrinsics are marked as unimplemented
rather than unreachable.
Since the Varhandle intrinsics are not implemented yet, the
functionality is not changed (i.e. the intrinsics are evaluated
at runtime and not compiled). I manually tested that the intrinsic
Visit* methods are triggered for the VarHandle methods.
Bug: b/65872996
Test: art/test.py --host -r -t 713-varhandle-invokers
Test: art/test.py --host --all-compiler -r
Change-Id: I3333728c5f16d8dc4f92ceae2738ed59b3e31e6a
|
|
When it can be proved that dividends are non-negative or the min integer
if their type is integral, there is no need to generate instructions
correcting the result.
The CL implements this optimization for ARM32/ARM64.
Test: 411-checker-hdiv-hrem-pow2
Test: test.py --host --optimizing --jit --gtest --interpreter
Test: test.py -target --optimizing --jit --interpreter
Test: run-gtests.sh
Change-Id: I11211a42918b5801fce8e78f305e69549739c23c
|
|
Emit direct calls from compiled managed code to the native
code registered with the method, avoiding the JNI stub.
Golem results:
art-opt-cc x86 x86-64 arm arm64
NativeDowncallStaticCritical +12.5% +62.5% +75.9% +41.7%
NativeDowncallStaticCritical6 +55.6% +87.5% +72.1% +35.3%
art-opt x86 x86-64 arm arm64
NativeDowncallStaticCritical +28.6% +85.6% +76.4% +38.4%
NativeDowncallStaticCritical6 +44.6% +44.6% +74.6% +32.2%
Test: Covered by 178-app-image-native-method.
Test: m test-art-host-gtest
Test: testrunner.py --host --debuggable --ndebuggable \
--optimizing --jit --jit-on-first-use
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Test: testrunner.py --target --debuggable --ndebuggable \
--optimizing --jit --jit-on-first-use -t 178
Test: aosp_cf_x86_phone-userdebug boots.
Test: aosp_cf_x86_phone-userdebug/jitzygote boots.
Bug: 112189621
Change-Id: I8b37da51e8fe0b7bc513bb81b127fe0416068866
|
|
Test: test.py
Change-Id: I5329e50a6b4521933b6b171c8c0fbc618c3f67cd
|
|
Pass enums by value instead of const reference.
Do not generate operator<< sources for headers that have no
enums or no declarations of operator<<. Do not define the
operator<< for flag enums; these were unused anyway.
Add generated operator<< for some enums in nodes.h . Change
the operator<< for ComparisonBias so that the graph
visualizer can use it but do not use the generated
operator<< yet as that would require changing checker tests.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Ifd4c455c2fa921a9668c966a13068d43b9c6e173
|
|
This CL introduces a minimal changes to the IR to support
autovectorization with use of predicated execution of SIMD
instructions (e.g. Arm SVE).
Test: test-art-target, test-art-host.
Change-Id: Ibb7c5520fec6b858fb29f0dde19ec65501831a3a
|
|
Let CompilerOptions hold the information whether it is AOT
or JIT compilation, or Zygote JIT for shared code.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --jit
Test: aosp_taimen-userdebug boots.
Change-Id: Id9200572406f8e43d99b8b61ef0e3edf43b52fff
|
|
This avoids passing the `VariableSizedHandleScope*` argument
around and eliminates HGraph::inexact_object_rti_ and its
initialization. The latter shall allow running Optimizing
gtests that do not require type information without creating
a Runtime in future. (To be implemented in a separate CL.)
Test: m test-art-host-gtest
Test: testrunner.py --host --optmizing
Test: aosp_taimen-userdebug boots.
Change-Id: I36fe9bc556c6d610d644c8c14cc74c9985a14d64
|
|
Use ObjPtr<> and bool instead of ReferenceTypeInfo to avoid
creating unnecessary temporary Handle<>s. This should reduce
compiler memory use a little bit.
And rewrite ReferenceTypePropagation::IsAdmissible() with
an explicit loop instead of a tail recursion.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Change-Id: Ic9952134d669b336fb28e6ea13117446d11dc145
|
|
This is a first CL in the series of introducing arm64 SVE support
in ART. The patch splits the codegen functionality into scalar and
vector ones and for the latter introduces NEON and SVE
implementations. SVE one currently is an exact copy of NEON one -
for the sake of testing and an easy diff when the next CL comes
with an actual SVE instructions support.
The patch effectively doesn't change any behavior; NEON mode is
used for vector instructions, tests pass.
Test: test-art-target.
Change-Id: I5f7f2c8218330998e5a733a56f42473526cd58e6
|
|
To help baseline compiler emit better code, construct
intermediate representation for intrinsics that have
corresponding HIR classes in the instruction builder,
instead of doing it in the instruction simplifier.
Note: The generated code is sometimes different than
before because GVN uses instruction ids for input
ordering for commutative operations.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Change-Id: Ifa3a5774f8f3fbff4e3ca359c38eceee993d62cd
|
|
IsAddConst2 function tried to extract addition chains
for the halving add idiom: (A + B) >> 1. The problem
was that regular shift right (x >> 1) was accepted for the
idiom (with {A: x, B: 0}) and not processed as a shift - which
broke the assumptions on shifts right and operand signedness.
This CL fixes that.
Test: 646-checker-simd-hadd.
Test: test-art-target.
Change-Id: Icf71e1a8e8c54e68114d7d5d6c4aa8a47ea5234d
|
|
Fix DCHECK() failure where we replaced an instruction
with non-null result (HInvoke StringBuilder.toString())
with an instruction that did not report that the result
cannot be null (HStringBuilderAppend) and then used the
result as both receiver and argument for String.equals().
The fix is to preserve the "cannot be null" invariant.
Test: Additional test in 697-checker-string-append.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 151107293
Bug: 19575890
Change-Id: I205f002bf8d2dfee6079ea0e14786ca0ab2e2e9c
|
|
This change rearranges some of the inliner code. The main goal is to
make some of the larger functions more readable and make clearer how to
modify the inliner in the future.
Some of the specific changes include:
* Code to find the actually call target has been factored into a
separate method.
* The call to TryInlineFromEarlyCache has been made into an early exit
rather than a fall through case. This lowers the indentation level for
the main inline case.
* Split the initial checks for whether inlining is possible into
IsInliningAllowed, IsInliningSupported, and
IsInliningBudgetAvailable. This is to make it more clear why these
restrictions are in place. Note that some of these checks are now in a
different order.
* Factor the checks that come after the inlined body has been optimized
into a separate method. These haven't been further broken down yet,
but this would be worthwhile future work.
* Remove CanAllocateRegistersFor. We should be able to allocate
registers for any compiler we support, and if not, this should be
caught when we try to allocate registers instead.
Bug: 149392334
Test: ./test/testrunner/testrunner.py --host --optimizing --no-jvmti --ndebug \
--64
Change-Id: Ic1b919e306b7b93944ee5686e2a487b2190c087c
|
|
Test: aosp_taimen-userdebug boots.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 147346243
Change-Id: I97fdc15e568ae3fe390efb1da690343025f84944
|
|
- Add a new hotness count in the ProfilingInfo to not conflict with
interpreter hotness which may use it for OSR.
- Add a baseline flag in the OatQuickMethodHeader to identify baseline
compiled methods.
- Add a -Xusetieredjit flag to experiment and test.
Bug: 119800099
Test: test.py with Xusetieredjit to true
Change-Id: I8512853f869f1312e3edc60bf64413dee9143c52
|
|
This reverts commit e2727154f25e0db9a5bb92af494d8e47b181dfcf.
Reason for revert: Breaks ASAN tests (ODR violation).
Bug: 142365358
Change-Id: I38103d74a1297256c81d90872b6902ff1e9ef7a4
|
|
Make symbols in compiler/optimizing hidden by a namespace
attribute. The unit intrinsic_objects.{h,cc} is excluded as
it is needed by dex2oat.
As the symbols are no longer exported, gtests are now linked
with the static version of the libartd-compiler library.
libart-compiler.so size:
- before:
arm: 2396152
arm64: 3345280
- after:
arm: 2016176 (-371KiB, -15.9%)
arm64: 2874480 (-460KiB, -14.1%)
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --jit
Bug: 142365358
Change-Id: I1fb04a33351f53f00b389a1642e81a68e40912a8
|
|
We currently don't handle this in the stack map, where we only encode
one stack slot for a dex register.
Bug: 136698025
Test: 721-osr
Change-Id: Ib395ed1165387ad5446a463c307cc0a45e365885
|
|
This is a follow up for the below patch:
https://android-review.googlesource.com/c/platform/build/+/830841
Test: ./test.py --host --64, test-art-host-gtest
Change-Id: Id2aa473035556ee230e66addeb69707df8530e75
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
|
|
Some of safepoints don't need to have DexRegisterMap info;
this will decrease the stackmap size.
.oat file size reduction:
- boot.oat: -233 kb (-5.4%)
- boot-framework.oat: -704 kb (-4.9%)
Test: 461-get-reference-vreg, 466-get-live-vreg.
Test: 543-env-long-ref, 616-cha*.
Test: test-art-target, +gc-stress.
Change-Id: Idbad355770e30a30dcf14127642e03ee666878b8
|
|
This reverts commit 2fef66b294417d447630f9d98de68227eef476d3.
Bug: 119800099
Bug: 136110523
Reason for revert: Fixed webview_zygote case.
Change-Id: Iaae8c999463d77b7b1e62b55458493bdbc97a104
|
|
There are additional instructions that can be emitted at use
site for x86/x86-64, such as ArrayLength, and the implicit
null check may therefore be emitted later than at the next
instruction. Search for the implicit null check until we
reach an instruction that's not emitted at use site.
This also reverts the blacklisting of the test, i.e.
commit 5be5260cfec2fc0a8c21ef1a08e7144523a8bfcd.
Test: testrunner.py --host \
--jit-on-first-use --debuggable -t 122-npe
Test: testrunner.py --host \
--optimizing --jit --jit-on-first-use \
--debuggable --ndebuggable
Bug: 136021898
Change-Id: I768f55d8c8975dbd0376802c10ca8508df3fe3b0
|
|
This reverts commit 05f87217ddc9b4b9186710c0135b918f456c5aef.
Bug: 119800099
Bug: 136110523
Reason for revert: testWebview flaking
Change-Id: I96afa6bc9c56c4aaf5ed72ae370f6f69c096c559
|
|
Test: boots
Bug: 119800099
Change-Id: I75ff8a58eea4de5cb833139641b4e15b8394d9b1
|
|
This is a misspelling that is somewhat common in art/.
Fix up all the instances I could find.
Test: ./test.py --host
Change-Id: I0a5def6e4126cf4e61efb0619bd59eb45ba7f324
|
|
It's generally useful, not just for the compiler.
Test: m test-art-host-gtest
Change-Id: I3ca742d93a0bca961d1b8b8209356747d2de08a0
|
|
Test: ./test.py --host, test-art-host-gtest
Change-Id: I48d05e6f6befd54657d962119a543b27a8a51d71
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
|
|
Recognize appending with StringBuilder and replace the
entire expression with a runtime call that perfoms the
append in a more efficient manner.
For now, require the entire pattern to be in a single block
and be very strict about the StringBuilder environment uses.
Also, do not accept StringBuilder/char[]/Object/float/double
arguments as they throw non-OOME exceptions and/or require a
call from the entrypoint back to a helper function in Java;
these shall be implemented later.
Boot image size for aosp_taimen-userdebug:
- before:
arm/boot*.oat: 19653872
arm64/boot*.oat: 23292784
oat/arm64/services.odex: 22408664
- after:
arm/boot*.oat: 19432184 (-216KiB)
arm64/boot*.oat: 22992488 (-293KiB)
oat/arm64/services.odex: 22376776 (-31KiB)
Note that const-string in compiled boot image methods cannot
throw, but for apps it can and therefore its environment can
prevent the optimization for apps. We could implement either
a simple carve-out for const-string or generic environment
pruning to allow this pattern to be applied more often.
Results for the new StringBuilderAppendBenchmark on taimen:
timeAppendLongStrings: ~700ns -> ~200ns
timeAppendStringAndInt: ~220ns -> ~140ns
timeAppendStrings: ~200ns -> 130ns
Bug: 19575890
Test: 697-checker-string-append
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Test: vogar --benchmark art/benchmark/stringbuilder-append/src/StringBuilderAppendBenchmark.java
Change-Id: I51789bf299f5219f68ada4c077b6a1d3fe083964
|
|
We do not actually emit intrinsic implementations for these
methods but we use this designation to simplify their use
knowing that they "return this". This also prepares for
recognizing and optimizing the StringBuilder append pattern.
Note that intrinsics are never inlined but these methods are
defined in core-oj and therefore the rest of the boot image
and prebuilts are not allowed to inline them anyway.
Boot image sizes for aosp_taimen-userdebug:
- before:
arm/boot*.oat: 19756400
arm64/boot*.oat: 23415656
- after:
arm/boot*.oat: 19653872 (-100KiB)
arm64/boot*.oat: 23292784 (-120KiB)
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 19575890
Change-Id: I2f3bac17830ac1c51287b090a96facddd3d09f5c
|
|
Generated by clang-tidy, with IgnoreDestructors option enabled.
Test: m checkbuild
Bug: 116509795
Change-Id: I5dafa10c2cf605165581b8cf7dd2633ed101ed65
|
|
HInstruction::GetKind() no longer involves virtual dispatch.
Test: Rely on TreeHugger
Change-Id: Id0cc04ab5e4b30c69fb32367558405f9c11b30ff
|
|
Allow dead reference elimination in methods not containing
@ReachabilitySensitive accesses or calls, when the class is marked
@DeadReferenceSafe.
Add 1339-dead-reference-safe to aggressively check that everything
works as intended.
Bug: 111453875
Test: art/test/testrunner/testrunner.py --host --64 -t 1339-dead-reference-safe
Detect ReachabilitySensitive annotations.
Change-Id: I70c20431fdbcfcfd2692b2255d12ad59e37cb669
|
|
Handlers of different exception types can start at the same
bytecode address, so we should update the type in the compiler
to avoid wrongly typing the exception.
bug: 119944057
Test: 689-multi-catch
Change-Id: I66e43890634965ee7790436c8e5a718564c6040f
|
|
Handles compiler.
Bug: 116054210
Test: WITH_TIDY=1 mmma art
Change-Id: I5cdfe73c31ac39144838a2736146b71de037425e
|
|
When only annotating lock requirements, use locks.h.
Bug: 119869270
Test: mmma art
Change-Id: I1608b03254712feff0072ebad012c3af0cc3dda4
|
|
This patch performs instruction simplification to
generate instructions andn, blsmsk and blsr on
cpus that have avx2.
Test: test.py --host --64, test-art-host-gtest
Change-Id: Ie41a1b99ac2980f1e9f6a831a7d639bc3e248f0f
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
|
|
Avoid caching the results. Caching was broken for JIT in the
presence of class unloading; entries for unloaded dex files
were leaked and potentially used erroneously with a newly
loaded dex file.
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target
Bug: 118808764
Change-Id: Ic1163601170364e060c2e3009752f543c9bb37b7
|
|
And enable test 920-objects that was crashing because
of this bug.
Test: testrunner.py --host --jit-on-first-use -t 920
Test: testrunner.py --host --optimizing
Test: m test-art-host-gtest
Bug: 117638896
Change-Id: I47dc893b121c82de537b3147c86d37a6eecf2d62
|
|
Implemented as a stripped down version of the optimizing compiler,
not running any optimization.
Adjust code to still work with expectations in code generators.
bug: 111397239
Test: test.py --baseline
Change-Id: I4328283825f9a890616e7496ed4c1e77d6bcc5dd
|
|
Move the analysis after redundant phi and dead phi elimination,
knowing that only graphs with irreducible loops may still have
a phi as input of the invoke. In such a case, we bail.
bug: 112537407
Test: 563-checker-fake-string
Change-Id: Ib9eefa4ce905b7fb418ca9b2a3c26ea4df74ce8f
|
|
Test: m
Change-Id: If8581d6edc2649ea1a6a306e84cde23597a59b76
|
|
|