summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_arm.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old ARM code generator from ART's Optimizing compiler.Roland Levillain2017-07-141-695/+0
| | | | | | | | | | 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
* Use ArtMethod* .bss entries for HInvokeStaticOrDirect.Vladimir Marko2017-06-071-4/+3
| | | | | | | | | | 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
* Replace invoke kind kDexCacheViaMethod with kRuntimeCall.Vladimir Marko2017-06-061-2/+4
| | | | | | | | | | | | | | | | 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
* Revert "ART: Reference.getReferent intrinsic for arm and arm64"Vladimir Marko2017-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor profiles to use TypeReference instead of ClassReferenceMathieu Chartier2017-05-251-1/+1
| | | | | | | | | | | 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
* Merge "Use PC-relative pointer to boot image methods."Treehugger Robot2017-05-231-4/+7
|\
| * Use PC-relative pointer to boot image methods.Vladimir Marko2017-05-221-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Revert "Revert "ARM: Improve the code generated for HCondition with a ↵Anton Kirilov2017-05-221-1/+8
|/ | | | | | | | | | | 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
* Remove LoadString/Class kind kBootImageLinkTimeAddress.Vladimir Marko2017-05-161-9/+0
| | | | | | | | | | | | 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
* Merge "Revert "ARM: Improve the code generated for HCondition with a ↵Nicolas Geoffray2017-05-101-8/+1
|\ | | | | | | constant input""
| * Revert "ARM: Improve the code generated for HCondition with a constant input"Nicolas Geoffray2017-05-101-8/+1
| | | | | | | | | | | | | | | | 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
* | Merge "ARM: Improve the code generated for HCondition with a constant input"Treehugger Robot2017-05-091-1/+8
|\|
| * ARM: Improve the code generated for HCondition with a constant inputAnton Kirilov2017-05-081-1/+8
| | | | | | | | | | | | Test: m test-art-target-run-test-409-materialized-condition Test: m test-art-target-run-test-570-checker-select Change-Id: Ie3418fbac1d2ecb4d7fc847d4722758e1e01bc2e
* | Merge "Improve the implementation of UnsafeCASObject with Baker read barriers."Roland Levillain2017-05-081-8/+21
|\ \
| * | Improve the implementation of UnsafeCASObject with Baker read barriers.Roland Levillain2017-05-051-8/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / ARM: Link-time generated thunks for Baker CC read barrier.Vladimir Marko2017-05-051-0/+18
|/ | | | | | | | | | | | | | | 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
* ARM: Reduce the number of branches generated for HCondition and HSelectAnton Kirilov2017-03-221-1/+0
| | | | | Test: m test-art-target-run-test-570-checker-select Change-Id: I87d2e87eb2fd30355101df07eb3754b013cedf63
* ARM: Avoid branches to branchesAnton Kirilov2017-03-171-1/+1
| | | | | | | | | | | | 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
* Merge "ARM(64): Improve the code generated for HSelect"Treehugger Robot2017-03-091-1/+2
|\
| * ARM(64): Improve the code generated for HSelectDonghui Bai2017-03-091-1/+2
| | | | | | | | | | | | | | 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>
* | Merge changes Ia26b07f0,Id3d2758cRoland Levillain2017-03-091-3/+9
|\ \ | | | | | | | | | | | | | | | * 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).""
| * | Revert "Revert "Use the "GC is marking" information in compiler read ↵Roland Levillain2017-03-061-3/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / Remove --include-patch-information option from dex2oat.Richard Uhler2017-03-081-2/+0
|/ | | | | | | | | | 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
* Revert "Use the "GC is marking" information in compiler read barriers (ARM, ↵Roland Levillain2017-02-271-9/+3
| | | | | | | | | | | | | 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
* Use the "GC is marking" information in compiler read barriers (ARM, ARM64).Roland Levillain2017-02-231-3/+9
| | | | | | | | | | | | | | | 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
* Merge "You shall know your arm32 calling conventions."Nicolas Geoffray2017-01-261-3/+1
|\
| * You shall know your arm32 calling conventions.Nicolas Geoffray2017-01-261-3/+1
| | | | | | | | | | | | | | | | 64bit values are passed starting an even register. test: ./art/test/run-test --no-relocate 529-checker-unresolved Change-Id: Ic3012f34898702b48fdab4d7a77dfdd4c2a1d916
* | Merge "Refactor code for unresolved field entrypoint."Nicolas Geoffray2017-01-261-1/+3
|\|
| * Refactor code for unresolved field entrypoint.Nicolas Geoffray2017-01-261-1/+3
| | | | | | | | | | | | | | | | | | | | - 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
* | Merge "ART: Reference.getReferent intrinsic for arm and arm64"Treehugger Robot2017-01-231-0/+1
|\ \ | |/ |/|
| * ART: Reference.getReferent intrinsic for arm and arm64TatWai Chong2017-01-231-0/+1
| | | | | | | | | | | | | | | | | | 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
* | Put the resolved class in HLoadClass.Nicolas Geoffray2017-01-161-1/+1
| | | | | | | | | | | | | | To avoid repeated lookups in sharpening/rtp/inlining. Test: test-art-host test-art-target Change-Id: I08d0da36a4bb061cdaa490ea2af3a3217a875bbe
* | Implement HLoadClass/kBssEntry for boot image.Vladimir Marko2017-01-161-1/+4
| | | | | | | | | | | | | | | | | | | | 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
* | Store resolved types for AOT code in .bss.Vladimir Marko2017-01-161-2/+3
| | | | | | | | | | | | | | | | | | | | 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
* | Keep resolved String in HLoadString.Nicolas Geoffray2017-01-101-1/+3
|/ | | | | | | | | | | 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
* Remove soon to be obsolete call kinds for direct calls.Nicolas Geoffray2016-12-201-8/+0
| | | | | | | | | | 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
* Remove obsolete DeduplicateDexCacheAddressLiteral().Vladimir Marko2016-12-131-1/+0
| | | | | | Test: Rely on TreeHugger Bug: 30627598 Change-Id: Ia3c7a1d528f62b730d7ac1cc7b67f21d9ff06c9e
* Revert "Revert "Add kJitTableAddress for HLoadClass.""Nicolas Geoffray2016-12-121-4/+9
| | | | | | This reverts commit d2d5262c8370309e1f2a009f00aafc24f1cf00a0. Change-Id: I6149d5c7d5df0b0fc5cb646a802a2eea8d01ac08
* Revert "Add kJitTableAddress for HLoadClass."Nicolas Geoffray2016-12-121-9/+4
| | | | | | | | One test failure after merge. This reverts commit 5b12f7973636bfea29da3956a9baa7a6bbe2b666. Change-Id: I120c49e53274471fc1c82a10d52e99c83f5f85cc
* Add kJitTableAddress for HLoadClass.Nicolas Geoffray2016-12-121-4/+9
| | | | | | | | | | 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
* ART: Add dex::StringIndexAndreas Gampe2016-11-291-2/+3
| | | | | | | Add abstraction for uint32_t string index. Test: m test-art-host Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed
* ART: Add dex::TypeIndexAndreas Gampe2016-11-211-2/+3
| | | | | | | Add abstraction for uint16_t type index. Test: m test-art-host Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
* Revert "Revert "Revert "Revert "JIT root tables.""""Nicolas Geoffray2016-11-181-5/+10
| | | | | | | | | | 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
* Revert "Revert "Revert "JIT root tables."""Nicolas Geoffray2016-11-141-10/+5
| | | | | | | | | 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
* Revert "Revert "JIT root tables.""Nicolas Geoffray2016-11-111-5/+10
| | | | | | | | | | | 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
* Use enum for read barrier options in compilerMathieu Chartier2016-11-101-4/+4
| | | | | | | | | Enums are just phenomenal. Also fixed a double load error in x86 interface check cast fast path. Test: test-art-host Change-Id: Iea403ce579145b6a294073f3900ad6921c1a0d53
* Avoid read barriers for inlined check castMathieu Chartier2016-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Merge "Add interface check cast fast path to arm, arm64, x86"Mathieu Chartier2016-11-091-1/+2
|\
| * Add interface check cast fast path to arm, arm64, x86Mathieu Chartier2016-11-091-1/+2
| | | | | | | | | | | | | | | | | | Bug: 12687968 Bug: 32577579 Test: test-art-host, test-art-target CC Change-Id: Ia57099d499fa704803cc5f0135f0f53fefe39826
* | Revert "Support kJitTableAddress in x86/arm/arm64."Nicolas Geoffray2016-11-091-10/+5
|/ | | | | | | | Revert this in order to revert https://android-review.googlesource.com/#/c/285781/ This reverts commit 997d1217830c0a18b70faeabd53c04700a87d7d9. Change-Id: I1888fba1c6f712cae4aec4ea4719b74a46da156c