summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_arm.h
AgeCommit message (Collapse)Author
2017-07-14Remove the old ARM code generator from ART's Optimizing compiler.Roland Levillain
The AArch32 VIXL-based code generator has been the default ARM code generator in ART for some time now. The old ARM code generator does not compile anymore; retiring it. Test: test.py Bug: 63316036 Change-Id: Iab8fbc4ac73eac2c1a809cd7b22fec6b619755db
2017-06-07Use ArtMethod* .bss entries for HInvokeStaticOrDirect.Vladimir Marko
Test: m test-art-host-gtest Test: testrunner.py --host Test: testrunner.py --target Test: Nexus 6P boots. Test: Build aosp_mips64-userdebug. Bug: 30627598 Change-Id: I0e54fdd2e91e983d475b7a04d40815ba89ae3d4f
2017-06-06Replace invoke kind kDexCacheViaMethod with kRuntimeCall.Vladimir Marko
In preparation for replacing the dex cache method array with a hash-based array, get rid of one unnecessary use. This method load kind is currently used only on mips for irreducible loops and OSR, so this should have no impact on x86/x86-64/arm/arm64. Test: m test-art-host-gtest Test: testrunner.py --host Test: Repeat the above tests with manually changing kDexCachePcRelative to kRuntimeCall in sharpening.cc. (Ignore failures in 552-checker-sharpening.) Bug: 30627598 Change-Id: Ifce42645f2dcc350bbb88c2f4642e88fc5f98152
2017-06-02Revert "ART: Reference.getReferent intrinsic for arm and arm64"Vladimir Marko
Reverting because GenerateCalleeMethodStaticOrDirectCall() prevents replacing kDexCacheViaMethod with kRuntimeCall where we would not retrieve the target method at all and leave the runtime to retrieve and call it just like for unresolved methods. The intrinsic should be re-implemented by loading the flags through HLoadClass. Note that the intrinsic was unimplemented for CC and a bit broken for non-CC, using LDR instead of LDRB for loading the flags. Test: Rely on TreeHugger. Bug: 32535355 Bug: 30627598 This reverts commit d8c052ac0aa3382c4807add33afa32580ffeecbb. Change-Id: I81fd14dac60c94ac543e336f4f3c888259fc8bd7
2017-05-25Refactor profiles to use TypeReference instead of ClassReferenceMathieu Chartier
Refactor type reference into runtime and use it for profiles. ClassReference was just duplicated code since it wasn't even using the class def indexes. Test: test-art-host Bug: 62040831 Change-Id: Ia92f21c0e85c00321f52c97bb7a90158d882849b
2017-05-23Merge "Use PC-relative pointer to boot image methods."Treehugger Robot
2017-05-22Use PC-relative pointer to boot image methods.Vladimir Marko
In preparation for adding ArtMethod entries to the .bss section, add direct PC-relative pointers to methods so that the number of needed .bss entries for boot image is small. Test: m test-art-host-gtest Test: testrunner.py --host Test: testrunner.py --target on Nexus 6P Test: Nexus 6P boots. Test: Build aosp_mips64-userdebug Bug: 30627598 Change-Id: Ia89f5f9975b741ddac2816e1570077ba4b4c020f
2017-05-22Revert "Revert "ARM: Improve the code generated for HCondition with a ↵Anton Kirilov
constant input"" This reverts commit 3082661d260449e1d773f077e914160c7ad58de5, and fixes the handling of HCondition with boolean inputs. Test: m test-art-target-run-test-409-materialized-condition Test: art/tools/run-libcore-tests.sh Change-Id: Ib21e3a81ba41ce20c06e9a9e454c4322af1513ae
2017-05-16Remove LoadString/Class kind kBootImageLinkTimeAddress.Vladimir Marko
We no longer support non-PIC boot image compilation. Also clean up some obsolete code for method patches and make JIT correctly report itself as non-PIC. Test: testrunner.py --host Test: testrunner.py --target Bug: 33192586 Change-Id: I593289c5c1b0e88b82b86a933038be97bbb15ad2
2017-05-10Merge "Revert "ARM: Improve the code generated for HCondition with a ↵Nicolas Geoffray
constant input""
2017-05-10Revert "ARM: Improve the code generated for HCondition with a constant input"Nicolas Geoffray
Reverting to see if that change is responsible for a crash. Will share with ARM if it is. This reverts commit b404f349d69f940ef2974915fe97c16070364efd. Change-Id: Idd04f9109447319445ff49f3fd7dc5b069b4883f
2017-05-09Merge "ARM: Improve the code generated for HCondition with a constant input"Treehugger Robot
2017-05-08ARM: Improve the code generated for HCondition with a constant inputAnton Kirilov
Test: m test-art-target-run-test-409-materialized-condition Test: m test-art-target-run-test-570-checker-select Change-Id: Ie3418fbac1d2ecb4d7fc847d4722758e1e01bc2e
2017-05-08Merge "Improve the implementation of UnsafeCASObject with Baker read barriers."Roland Levillain
2017-05-05Improve the implementation of UnsafeCASObject with Baker read barriers.Roland Levillain
On ARM and ARM64, avoid loading the reference altogether when the GC is not marking. Also, extract the code logic for updating a reference field from GenerateReferenceLoadWithBakerReadBarrier routines and move it to new routines (UpdateReferenceFieldWithBakerReadBarrier), to make the implementation more legible. Test: Run ART target tests in Baker read barrier configuration. Bug: 29516974 Change-Id: I11c53f0607e997cd02ec7911725e98ef3dc97d90
2017-05-05ARM: Link-time generated thunks for Baker CC read barrier.Vladimir Marko
Remaining work for follow-up CLs: - use implicit null check in field thunk, - use 16-bit LDRs for fields and GC roots. Test: m test-art-target-gtest Test: testrunner.py --target on Nexus 6P. Test: testrunner.py --target on Nexus 6P with heap poisoning enabled. Test: Repeat the above tests with ART_USE_OLD_ARM_BACKEND=true. Bug: 29516974 Bug: 30126666 Bug: 36141117 Change-Id: Iad5addab72d790a9d61879f61f2e75b246bcdf5a
2017-03-22ARM: Reduce the number of branches generated for HCondition and HSelectAnton Kirilov
Test: m test-art-target-run-test-570-checker-select Change-Id: I87d2e87eb2fd30355101df07eb3754b013cedf63
2017-03-17ARM: Avoid branches to branchesAnton Kirilov
Generally speaking, this optimization applies to all code generation visitors ending with a call to Bind(), which includes intrinsics with kNoCall CallKind. However, no changes are done for slow paths (which frequently end with a branch to an exit label that is bound at the end of a visitor). Test: m test-art-target Change-Id: Ie1a0c8c54ef76b01e7f0b23962c56c29ca8984a9
2017-03-09Merge "ARM(64): Improve the code generated for HSelect"Treehugger Robot
2017-03-09Merge changes Ia26b07f0,Id3d2758cRoland Levillain
* changes: Revert "Revert "Use the holder's gray bit in Baker read barrier slow paths (ARM, ARM64)."" Revert "Revert "Use the "GC is marking" information in compiler read barriers (ARM, ARM64).""
2017-03-09ARM(64): Improve the code generated for HSelectDonghui Bai
Test: m test-art-target-run-test-566-checker-codegen-select Test: m test-art-target-run-test-570-checker-select Change-Id: If0140892303490701782df9a818e6d8346bf3d6c Signed-off-by: Anton Kirilov <anton.kirilov@linaro.org>
2017-03-08Remove --include-patch-information option from dex2oat.Richard Uhler
Because we no longer support running patchoat on npic oat files, which means the included patch information is unused . Bug: 33192586 Test: m test-art-host Change-Id: I9e100c4e47dc24d91cd74226c84025e961d30f67
2017-03-06Revert "Revert "Use the "GC is marking" information in compiler read ↵Roland Levillain
barriers (ARM, ARM64)."" This reverts commit 35345a555bd7928582a7ffa6369b374b3ddc379d. In compiler-generated code, when deciding whether to mark a heap reference or not in a read barrier, check whether the GC is currently marking, instead of checking the gray bit in the reference's holder's lock word. This change is only for ARM and ARM64, as it does not benefit x86 nor x86-64. Change-Id: Id3d2758c600115b2f07d345442cfa87edfc2792c Test: Run ART tests in Baker read barrier configuration. Test: Boot a device in Baker read barrier configuration. Bug: 35780827 Bug: 29516974
2017-02-27Revert "Use the "GC is marking" information in compiler read barriers (ARM, ↵Roland Levillain
ARM64)." This reverts commit 1372c9f40df1e47bf775f1466bbb96f472b6b9ed. This change (along with https://android-review.googlesource.com/#/c/342429/) creates null pointer dereferences. Bug: 35780827 Bug: 29516974 Change-Id: I2a9c4d0ad8d2ab870c2e0ddbff32152933c77abe
2017-02-23Use the "GC is marking" information in compiler read barriers (ARM, ARM64).Roland Levillain
In compiler-generated code, when deciding whether to mark a heap reference or not in a read barrier, check whether the GC is currently marking, instead of checking the gray bit in the reference's holder's lock word. This change is only for ARM and ARM64, as it does not benefit x86 nor x86-64. Test: Run ART tests in Baker read barrier configuration. Test: Boot a device in Baker read barrier configuration. Bug: 29516974 Change-Id: Ia5d90286bb9f753f3bbcb3a6254eb166523a2ff5
2017-01-26Merge "You shall know your arm32 calling conventions."Nicolas Geoffray
2017-01-26You shall know your arm32 calling conventions.Nicolas Geoffray
64bit values are passed starting an even register. test: ./art/test/run-test --no-relocate 529-checker-unresolved Change-Id: Ic3012f34898702b48fdab4d7a77dfdd4c2a1d916
2017-01-26Merge "Refactor code for unresolved field entrypoint."Nicolas Geoffray
2017-01-26Refactor code for unresolved field entrypoint.Nicolas Geoffray
- Do macro magic to avoid source code duplication. - Do not fetch the referrer from the assembly, but from the C entrypoint instead. Test: test-art-host test-art-target Change-Id: Ib139c94bc8f74686640cad538ba75dc56fa00e1d
2017-01-23Merge "ART: Reference.getReferent intrinsic for arm and arm64"Treehugger Robot
2017-01-23ART: Reference.getReferent intrinsic for arm and arm64TatWai Chong
Test: m test-art-host Test: m test-art-target Test: export ART_HEAP_POISONING=true; m test-art-host Test: export ART_HEAP_POISONING=true; m test-art-target Bug: 32535355 Change-Id: Ie63317689dd9e03a24e701c30411f8014970173a
2017-01-16Put the resolved class in HLoadClass.Nicolas Geoffray
To avoid repeated lookups in sharpening/rtp/inlining. Test: test-art-host test-art-target Change-Id: I08d0da36a4bb061cdaa490ea2af3a3217a875bbe
2017-01-16Implement HLoadClass/kBssEntry for boot image.Vladimir Marko
Test: m test-art-host Test: m test-art-host with CC Test: m test-art-target on Nexus 9 Test: Nexus 9 boots. Test: Build aosp_mips64-eng Bug: 30627598 Change-Id: I168f24dedd5fb54a1e4215ecafb947ffb0dc3280
2017-01-16Store resolved types for AOT code in .bss.Vladimir Marko
Test: m test-art-host Test: m test-art-target on Nexus 9. Test: Nexus 9 boots. Test: Build aosp_mips64-eng. Bug: 30627598 Bug: 34193123 Change-Id: I8ec60a98eb488cb46ae3ea56341f5709dad4f623
2017-01-10Keep resolved String in HLoadString.Nicolas Geoffray
For the following reasons: - Avoids needing to do a lookup again in CodeGenerator::EmitJitRoots. - Fixes races where we the string was GC'ed before CodeGenerator::EmitJitRoots. - Makes it possible to do GVN on the same string but defined in different dex files. Test: test-art-host, test-art-target Change-Id: If2b5d3079f7555427b1b96ab04546b3373fcf921
2016-12-20Remove soon to be obsolete call kinds for direct calls.Nicolas Geoffray
And remove CompilerDriver::GetCodeAndMethodForDirectCall in preparation of removing non-PIC prebuild and non-PIC on-device boot image compilation. Test: test-art-host test-art-target bug:33192586 Change-Id: Ic48e3e8b9d7605dd0e66f31d458a182198ba9578
2016-12-13Remove obsolete DeduplicateDexCacheAddressLiteral().Vladimir Marko
Test: Rely on TreeHugger Bug: 30627598 Change-Id: Ia3c7a1d528f62b730d7ac1cc7b67f21d9ff06c9e
2016-12-12Revert "Revert "Add kJitTableAddress for HLoadClass.""Nicolas Geoffray
This reverts commit d2d5262c8370309e1f2a009f00aafc24f1cf00a0. Change-Id: I6149d5c7d5df0b0fc5cb646a802a2eea8d01ac08
2016-12-12Revert "Add kJitTableAddress for HLoadClass."Nicolas Geoffray
One test failure after merge. This reverts commit 5b12f7973636bfea29da3956a9baa7a6bbe2b666. Change-Id: I120c49e53274471fc1c82a10d52e99c83f5f85cc
2016-12-12Add kJitTableAddress for HLoadClass.Nicolas Geoffray
This new kind loads classes from the root table associated with JIT compiled code. Also remove kDexCacheAddress, which is replaced by kJitTableAddress. test: ART_TEST_JIT=true test-art-host-jit test-art-target-jit Change-Id: Ia23029688d1a60c178bf2ffa7463927c5d5de4d0
2016-11-29ART: Add dex::StringIndexAndreas Gampe
Add abstraction for uint32_t string index. Test: m test-art-host Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed
2016-11-21ART: Add dex::TypeIndexAndreas Gampe
Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
2016-11-18Revert "Revert "Revert "Revert "JIT root tables.""""Nicolas Geoffray
Test: 626-set-resolved-string, test-art-host, test-art-target Test: run-libcore-tests.sh Test: phone boots and runs This reverts commit 3395fbc20bcd20948bec8958db91b304c17cacd8. Change-Id: I104b73d093e3eb6a271d564cfdb9ab09c1c8cf24
2016-11-14Revert "Revert "Revert "JIT root tables."""Nicolas Geoffray
libcore failures: dalvikvm32 F 11-14 03:04:06 14870 14870 jit_code_cache.cc:310] Check failed: new_string != nullptr This reverts commit 75afcdd3503a8a8518e5b23d21b6e73306ce39ce. Change-Id: I5a6b6b48aa79a763d1ff1ba4d85d63811254787d
2016-11-11Revert "Revert "JIT root tables.""Nicolas Geoffray
Also contains Revert "Support kJitTableAddress in x86/arm/arm64." This reverts commit 4acd03638fcdb4e5d1666f8eec7eb3bf6d6be035. This reverts commit 997d1217830c0a18b70faeabd53c04700a87d7d9. Test: ART_USE_READ_BARRIER=true/false test-art-host test-art-target Change-Id: I77cb1e9bf8f1b4c58b72d3cf5ca31ced2aaa1ea3
2016-11-10Use enum for read barrier options in compilerMathieu Chartier
Enums are just phenomenal. Also fixed a double load error in x86 interface check cast fast path. Test: test-art-host Change-Id: Iea403ce579145b6a294073f3900ad6921c1a0d53
2016-11-09Avoid read barriers for inlined check castMathieu Chartier
Avoiding read barriers improves speed and reduces code size. Doing this can never result in false positives, only false negatives. These false negatives are handled correcly by rechecking in the entrypoint. Ritzperf code size for CC: arm32: 13439400->13300136 (-1.04%) arm64: 16405120->16253568 (-0.92%) Perf: TODO Bug: 29516974 Bug: 12687968 Test: test-art-host, run ritzperf both with CC Change-Id: Ie024e0b1e8ee415781fb73e8029e87e8a5318f86
2016-11-09Merge "Add interface check cast fast path to arm, arm64, x86"Mathieu Chartier
2016-11-09Add interface check cast fast path to arm, arm64, x86Mathieu Chartier
Bug: 12687968 Bug: 32577579 Test: test-art-host, test-art-target CC Change-Id: Ia57099d499fa704803cc5f0135f0f53fefe39826
2016-11-09Revert "Support kJitTableAddress in x86/arm/arm64."Nicolas Geoffray
Revert this in order to revert https://android-review.googlesource.com/#/c/285781/ This reverts commit 997d1217830c0a18b70faeabd53c04700a87d7d9. Change-Id: I1888fba1c6f712cae4aec4ea4719b74a46da156c