Age | Commit message (Collapse) | Author |
|
The stored information will be used in follow-up CLs.
This temporarily increases .oat file size by 0.7%.
Test: test-art-host-gtest
Change-Id: Ie7d898b06398ae44287bb1e8153861ab112a216c
|
|
|
|
Two simple classes which replace the need to pass
the (BitMemoryRegion, bit_offset) tuple everywhere.
The slightly simplifies the code and it also makes
it possible to optimize those classes in the future.
Test: test-art-host-gtest-stack_map_test
Test: test-art-host-gtest-bit_table_test
Change-Id: I4806c805149a07e1a11b76405ca27960a0012c69
|
|
|
|
|
|
GenerateIntRem functions"
|
|
And fix the intrinsic for JIT even in case when someone
messes up the IntegerCache using reflection. Two cases are
exposed with a regression test (one that previously failed
randomly and one that failed 100%) but other crashes were
possible; for example, we would need a read barrier for
array reads when elements are not guaranteed to be in the
boot image.
The new approach loads references only from the boot image
live objects array which cannot be touched by reflection.
The referenced objects and IntegerCache.cache are exposed
and can lead to weird behavior but not crashes.
On x86, the pc_relative_fixups_86 actually checks the cache
an additional time but discrepancies between this check and
the location building at the beginning of codegen should be
OK as the HIsX86ComputeBaseMethodAddress should be added
for PIC regardless of whether pc_relative_fixups_86 thinks
the method is intrinsified or not.
Test: 717-integer-value-of
Test: Pixel 2 XL boots.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --pictest --npictest
Test: testrunner.py --host --jit
Test: testrunner.py --target --optimizing --pictest --npictest
Test: testrunner.py --target --jit
Bug: 71526895
Change-Id: I89b3245a62aba22980c86a99e2af480bfa250af1
|
|
Change the default parameters for HashSet<std::string> to
allow passing StringPiece as a key, avoiding an unnecessary
allocation. Use the HashSet<std::string> instead of
std::unordered_set<std::string>. Rename HashSet<> functions
that mirror std::unordered_multiset<> to lower-case.
Fix CompilerDriver::LoadImageClasses() to avoid using
invalidated iterator.
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I7f8b82ee0b07befc5a0ee1c420b08a2068ad931e
|
|
Test: test.py --host -r -b -t 018 -t 510
Change-Id: I07042e8dfd82adcd24fdfe1a1970a7ccdc09ce46
|
|
Remove empty constructor.
Test: mmma art
Change-Id: Ie58721299a6675797e9a525f4eb7e6df82abed50
|
|
* changes:
ART: Fix some performance-X tidy
ART: Mask garbage-memory warnings
ART: Fix clang-analyzer leak/memory warnings
|
|
|
|
Fix warnings, or make code more obvious to the analyzer.
(The analysis itself is too expensive to force it on for all
local builds.)
Test: mmma art (with clang-analyzer-cplusplus.NewDeleteLeaks)
Change-Id: Id3687eb6f3af3a0b4f2df1422bc6d83650517623
|
|
|
|
|
|
Some of the environment uses of primitive-typed values are
not really needed in non-debuggable/non-OSR methods. Ignoring
those uses during liveness analysis significantly reduces the
size of stack maps in the oat file.
Code reduction on arm64:
boot-framework.oat: -1.8%
boot.oat: -1.4%
Test: 466-get-live-vreg, 564-checker-condition-liveness.
Test: 639-checker-code-sinking.
Test: angler boots to GUI.
Test: test-art-host, test-art-target
Change-Id: I91dcb6d0a8ab86f56c7b243bf9b100f69bcd5979
|
|
Support BoundType instruction treatment in GVN.
Note: BoundType must not be a subject to LICM as it must not be
moved from more control dependent basic blocks to less control
dependent (e.g. hoisted out from the loop) due to semantics of
bounding the type.
Test: 477-checker-bound-type.
Test: test-art-target, test-art-host.
Change-Id: I64263d6ec7d9ad75d1fb07d3a89e9973be67682b
|
|
Test: test-art-host-gtest-stack_map_test
Test: test-art-host-gtest-bit_table_test
Change-Id: I96c04e21864009b64cb3177a0e9f0f8782a9b10b
|
|
|
|
|
|
Instead of declaring the classes explicitly and then casting,
create generic BitTableBuilder::Entry class for that purpose.
This removes the need to keep the POD helper classes in sync.
Test: test-art-host-gtest-stack_map_test
Test: test-art-host-gtest-bit_table_test
Change-Id: I4c632313bafd3a4bc823648436a5310b6f2a1d13
|
|
Test: test-art-host-gtest-stack_map_test
Change-Id: I0abab008159db023d531df69214cd3bb8c0639bd
|
|
|
|
Integrate instruction code generation and location creation with
HandleBinaryOp. Code generation has been improved for constant
inputs 0, 1 and -1.
Test: 679-checker-minmax
Test: test-art-host, test-art-target.
Change-Id: Ib34eb8a4b29d22a2491d21656e1f64011ef9f986
|
|
GenerateIntRem functions
VisitDiv and VisitRem call GenerateDivRemIntegral.
GenerateDivRemIntegral does not know whether it is invoked for HDiv or
HRem and has to check this. As a result all GenerateDivRem* functions
have such checks. Code for optimizing HRem and HDiv, e.g. a denominator is
power of 2, can be specific for HRem or HDiv. So having it in
GenerateDivRem would create issues with code maintenance.
This patch split GenerateDivRem* functions into GenerateIntDiv* and
GenerateIntRem. BTW 'Integral' meaning is not 'Integer'. So changed it
as well. It also removes the case 'division by 1 or -1' because the case
is handled in InstructionSimplifierVisitor. As there is a commonly used
function Int64ConstantFrom(Location) it is used instead of
Int64FromConstant(HConstant). This removes some code as well.
Test: 012-math, 014-math3, 411-optimizing-arith
Test: test-art-host, test-art-target
Change-Id: I972129b24a206c8230d304be551cd2c18dbc7c9c
|
|
Add 'Kind' column to stack maps which marks special stack map types,
and use it at run-time to add extra sanity checks.
It will also allow us to binary search the stack maps.
The column increases .oat file by 0.2%.
Test: test-art-host-gtest-stack_map_test
Change-Id: I2a9143afa0e32bb06174604ca81a64c41fed232f
|
|
Simplify String.indexOf() called on empty or single-char
constant string. We see these patterns in inlined
java.net.URI$Parser.scan(int, int, String, String)
called with constant strings from other URI$Parser methods.
The empty string simplification allows constant folding
and DCE to remove some of the code. The single-character
string simplification avoids entrypoint call overhead.
Test: New tests in 458-checker-instruct-simplification
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I4d3c997a8d6220202d481bbf8cbf280832c27cd7
|
|
|
|
- Disable test configuration art-gtest-valgrind64
(art-gtest-valgrind32 was already disabled).
- Remove Makefile logic regarding testing with Valgrind.
- Remove occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_VALGRIND`.
- Replace occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_ASAN` with
`TEST_DISABLED_FOR_MEMORY_TOOL`.
- Replace the potentially dynamically evaluated
`RUNNING_ON_MEMORY_TOOL` expression with constant
`kRunningOnMemoryTool`.
- Simplify and fold the logic of
`art::ArenaAllocatorMemoryToolCheckImpl` and
`art::ArenaAllocatorMemoryToolCheck` into
`art::ArenaAllocatorMemoryTool`.
- Adjust comments regarding memory tools.
- Remove Valgrind suppression files.
- Remove `--callgrind` option from tools/art.
This reverts commit 8b362a87d52a6668ffd2283ef6ffc274315f41c8.
Change-Id: I23c76845e6ccf766f19b22b58a0d5161f60842a9
Test: art/test.py
Test: art/test/testrunner/run_build_test_target.py art-asan
Bug: 77856586
Bug: 29282211
|
|
|
|
|
|
Add support for the compiler to call into the runtime for
invoke-custom bytecodes.
Bug: 35337872
Test: art/test.py --host -r -t 952
Test: art/test.py --target --64 -r -t 952
Test: art/test.py --target --32 -r -t 952
Change-Id: I821432e7e5248c91b8e1d36c3112974c34171803
|
|
|
|
|
|
bug: 109666561
Test: m
Change-Id: Ia10990d7caeb37d23d3096b087541aac9eea0c3d
|
|
Moves to pattern used by the interpreter bridge and writes the result
in both the regular return register and the floating point result
register.
Add return value tests to 956-method-handles.
Test: art/test.py --host -r -t 956
Test: art/test.py --target --32 -r -t 956
Test: art/test.py --target --64 -r -t 956
Change-Id: I7389d04b70b88e149682f6d656ab185e48bcbf66
|
|
|
|
Removes a separate class_def_idx being required for getting the index
of a ClassAccessor foreach loop.
Bug: 79758018
Test: test-art-host-gtest
Change-Id: Ie3010a17669f24cf492c678b55bdddba7ec62ea8
|
|
Keep boot image objects referenced by the intrinsic alive
through boot image roots, so that they can never be dead as
the intrinsic would still be able to resurrect them later.
Note that currently the GC considers all boot image objects
live forever. That risks leaking memory and should be fixed.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 71526895
Change-Id: Iec25cc27e9c5c4bd3c5711991e3111bfb19ef182
|
|
|
|
They are no longer needed in the new encoding.
I reuse the local variables in most places to DCHECK the size
of the decoded register map. This has one catch though:
We sometimes omit all dex registers, so the DCHECK should be
done only after checking if the map is empty (if applicable).
Test: test-art-host-gtest-stack_map_test
Change-Id: I94b67029842374bc8eb7c9e5eac76fc93a651f24
|
|
The register maps tend to be similar from stack map to stack map,
so instead of encoding them again, store only the modified ones.
The dex register bitmap stores the delta now - if register has
been modified since the previous stack map, the bit will be set.
The decoding logic scans backwards through stack maps until it
eventfully finds the most recent value of each register.
This CL saves ~2.5% of .oat file size (~10% of stackmap size).
Due to the scan, this makes dex register decoding slower by factor
of 2.5, but that still beats the old algorithm before refactoring.
Test: test-art-host-gtest-stack_map_test
Change-Id: Id5217a329eb757954e0c9447f38b05ec34118f84
|
|
|
|
Simplifies the code somewhat. It also makes it possible
to get column names as strings for the debugging code.
Test: test-art-host-gtest-stack_map_test
Change-Id: I1a2e146e7a4372c0752693313e1b881cb4a818bc
|
|
|
|
The InlineInfo class actually represented a list of inlining
information for a given stack map, and the depth argument was
used everywhere to select to desired element from the list.
This was verbose and inconsistent with the other classes.
Change the InlineInfo class to represent a single inlining,
and select the desired depth when getting it from CodeInfo.
Test: test-art-host-gtest-stack_map_test
Change-Id: I35b73e6704854f0203f51d4dbdbed5b1d1cd5a3b
|
|
|
|
|
|
This saves 0.3% of .oat file size.
Test: test-art-host-gtest-stack_map_test
Change-Id: Ic7d5addf04fb9b7a2f29a7d1d99ea93b39388fd2
|
|
And remove some unnecessary calls to ObjPtr<>::Ptr().
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ie313980f7f23b33b0ccea4fa8d5131d643c59080
|