summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
AgeCommit message (Collapse)Author
2022-09-06Correctly delete all uses when building up the domination graph Santiago Aboy Solanes
We now consider the edge case where the dead instruction we wanted to remove was used in a phi which is not directly following the block we are processing right now. To fix this, we process all blocks before trying to remove the instructions. As a note, we remove catch phi uses right before removing the instruction as they are related to the instruction itself and not the block hierarchy. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: dex2oat compiling locally the apps mentioned in the bug Bug: 239519319 Change-Id: I70d47891203ae118851a1f20a7cee21de305cd61
2022-09-02Remove instructions from dead blocks when building the dominator tree Santiago Aboy Solanes
We now remove the instructions to free up memory. We have to refactor methods a little bit to avoid removing instructions as users twice, since we do not support that. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: Ia34c4a6af204952d295e5a2cb534115ced97ab07
2022-08-17Reland "Propagating values from if clauses to its successors" Santiago Aboy Solanes
This reverts commit fa1034c563b44c4f557814c50e2678e14dcd1d13. Reason for revert: Relanding after float/double fix. In short, don't deal with floats/doubles since they bring a lot of edge cases e.g. if (f == 0.0f) { // f is not guaranteed to be 0.0f, e.g. it could be -0.0f. } Bug: 240543764 Change-Id: I400bdab71dba0934e6f1740538fe6e6c0a7bf5fc
2022-08-09Revert "Propagating values from if clauses to its successors" Santiago Aboy Solanes
This reverts commit c6b816ceb2b35300c937ef2e7d008598b6afba21. Reason for revert: Broke libcore test https://ci.chromium.org/ui/p/art/builders/ci/angler-armv7-ndebug/3179/overview Change-Id: I4f238bd20cc485e49078104e0225c373cac23415
2022-08-09Rename HNativeDebugInfo to HNop Santiago Aboy Solanes
We can generalize HNativeDebugInfo to be used as a Nop (i.e. no instructions are generated), and give it the option of having an environment to keep the current HNativeDebugInfo logic working. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I06b3a36e8b124bcda858d2c9cd8ff0ab21caea36
2022-08-09Propagating values from if clauses to its successors Santiago Aboy Solanes
We have knowledge of the value of some variables at compile time due to the fact they are used in if clauses. For example: if (variable == constant) { // SSA `variable` guaranteed to be equal to constant here. } else { // No guarantees can be made here (except for booleans since // they only have two values). } Similarly with `variable != constant`. We can also apply this to boolean parameters e.g. void foo (boolean val) { if (val) { // `val` guaranteed to be true here. ... } ... } Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I55df0252d672870993d06e5ac92f5bba44d902bd
2022-08-02Update the successor's Phis in RemoveDeadBlocks Santiago Aboy Solanes
When we remove a dead block, we update its successor's phis (as long as the successor is still reachable). We can reuse code from DisconnectAndDelete if we refactor it a little bit. Bug: 240546614 Fixes: 240546614 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I70c509bd1c9e392118bbf95c7aaac64faa46237f
2022-07-19Improve DCE's SimplifyAlwaysThrows regarding Invoke location Santiago Aboy Solanes
Allow SimplifyAlwaysThrows to run on any invoke that always throws, and not just the second to last instruction. As a bonus, there are two places that would make a graph have invokes that always throws: 1) When inlining a method that has invokes that always throw. 2) When trying to inline a method, and not doing it since it always throws. Since we only have those two places, we can add a flag to the graph that tracks this. We then skip the SimplifyAlwaysThrows optimization altogether if the graph doesn't have that flag set. Bug: 227316307 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: Ia353fcf2c055885cc04e10790584210c2e488e32
2022-06-29Make LoadMethod{Handle,Type} instruction throwing. Nicolas Geoffray
Bug: 235576668 Test: 979-const-method-handle Change-Id: Ia0077ea6c050adc33d109195177b3fc61236a876
2022-06-08Revert^2 "ART: Removes SuspendCheck for plain Stelios Ioannou
loops with a low trip count." This change removes SuspendCheck for plain loops with a low trip count. The SuspendCheck in the codegen makes sure that the thread can be interrupted during execution for GC. Not being able to do so might decrease the responsiveness of GC in the case when a very long loop or a long recursion is being executed. However, for plain loops with a small trip count, the removal of SuspendCheck should not affect the GC's responsiveness by a large margin. Consequently, since the thread won't be interrupted for plain loops, it is assumed that the performance might increase by removing SuspendCheck. Also add explicit checks to existing code to ensure that SuspendCheck is never null when it is used. This reverts commit 8f6b99fba2d043265a84d599a967d52f66738ad6 Reason for revert: Included fix for CHAGuardVisitor::HoistGuard crash by disabling codegen for optimized SuspendCheck nodes instead of removing the SuspendCheck node itself. Test: art/test.py -v -j12 --host --64 -t 2233-checker\ -remove-loop-suspend-check --run-test --optimizing Change-Id: Id6296aded91e1cf49b8f3f339dc83613cbedf876
2022-03-28Fix last value generation in loop optimization. Vladimir Marko
Instead of `in_body`, propagate the context block and loop information to make better decisions for trip count if the context is outside the loop. In particular, fix `InductionVarRange::IsConstant()` to take and use this information instead of assuming that we are asking about values in the loop body. For trip count with context outside the loop, we know that the value shall be the maximum trip count if the context is dominated by the loop control exit block. Test: Enable run-test 835-b216762268. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 216762268 Change-Id: Id564ba75c812d54abdd9b229e643cc8ab4701c52
2022-02-25Update compiler/ implications to use (D)CHECK_IMPLIES Santiago Aboy Solanes
Follow-up to aosp/1988868 in which we added the (D)CHECK_IMPLIES macro. This CL uses it on compiler/ occurrences found by a regex. Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: If63aed969bfb8b31d6fbbcb3bca2b04314c894b7
2022-01-10Remove operator<< from HGraph. Nicolas Geoffray
It needs access to a code generator. Test: observe a bogus graph at the point of register allocator, and see that the Dump method crashes. Change-Id: I09a847246428fd3bd0938f9f457773c465da253d
2021-12-03Mark HMethodEntry/ExitHook as CanThrow Mythri Alle
MethodEntry / Exit can throw so mark them as such. They already marked as causing side-effects and that they could trigger a GC so this may not be a correctness issue. Test: art/test.py Bug: 208587492 Change-Id: Ic741d9fd3c794da77c46104e859629d1afa48336
2021-11-29Simplify hotness count in baseline compiled code. Nicolas Geoffray
- Always require the current ArtMethod, which also removes the need to handle empty frames. - Remove the use of some temporary registers. - Require a profiling info when compiling baseline. - Add a slow path for requiring an optimized compilation. - Make the counter decrement instead of increment. A next CL will make the hotness configurable through --jittreshold. Test: test.py Bug: 146423102 Change-Id: I1485f66401d6ed218456fe2849eb05fa77479668
2021-11-09Revert^2 "Add support for calling entry / exit hooks directly from JIT code"" Mythri Alle
This reverts commit 72be14ed06b76cd0e83392145cec9025ff43d174. Reason for revert: A reland of commit 2d4feeb67912d64b9e980e6687794826a5c22f9d with a fix for no-image tests Change-Id: I79f719f0d4d9b903db301a1636fde5689da35a29
2021-11-01Revert "Add support for calling entry / exit hooks directly from JIT code" Mythri Alle
This reverts commit 2d4feeb67912d64b9e980e6687794826a5c22f9d. Reason for revert: This breaks no-image tests. Example failure: https://android-build.googleplex.com/builds/submitted/7871904/art-no-image/latest/view/logs/build_error.log Change-Id: I0f97c672c2d48f125931171ee1041a7c1cf20127
2021-11-01Revert^2 "Inline across dex files for bootclaspath's methods" Santiago Aboy Solanes
This reverts commit 8cb989f1019c4fa30845bf2deb5bc996ed4e8966, so we are re-enabling commit d690f8ae8f8e2675bc52089a83ac18c749f8e6d2. Reason for revert: Failing test was fixed here https://android-review.googlesource.com/c/platform/art/+/1873567 Bug: 154012332 Test: ART tests Change-Id: If159b29583e35abcfe753f30483f83990208b1b9
2021-11-01Add support for calling entry / exit hooks directly from JIT code Mythri Alle
The idea of this CL is to avoid maintaining the instrumentation stack and manipulating the return addresses on the stack to call the entry / exit hooks. This Cl only addresses this for JITed code. In follow up CLs, we will extend this to others (native, nterp). Once we have everything in place we could remove the complexity of instrumentation stack. This CL introduces new nodes (HMethodEntry / HMethodExit(Void)) that generate code to call the trace entry / exit hooks when instrumentation_stubs are installed. Currently these are introduced for JITed code in debuggable mode. The entry / exit hooks roughly do the same this as instrumentation entry / exit points. We also extend the JITed frame slots by adding a ShouldDeoptimize slot. This will be used to force deoptimization of frames when requested by jvmti (for ex: structural re-definition). Test: art/testrunner.py Change-Id: Id4aa439731d214a8d2b820a67e75415ca1d5424e
2021-10-29Revert "Inline across dex files for bootclaspath's methods" Santiago Aboy Solanes
This reverts commit d690f8ae8f8e2675bc52089a83ac18c749f8e6d2. Reason for revert: Test breakage related to VarHandles e.g. https://ci.chromium.org/ui/p/art/builders/ci/angler-armv7-ndebug/2409/overview Change-Id: I0d3537cd0907866c628478fad1d77aff4ee65113
2021-10-26Inline across dex files for bootclaspath's methods Santiago Aboy Solanes
We can relax a bit the restriction for not inlining across dexfiles when we are AoT compiling and we need an environment. There's an added new restriction related to BSS entries. We could potentially inline across dex files for those cases too but are left to be solved in follow-up CLs. Bug: 154012332 Test: ART tests Change-Id: I5122b26c79b3e30d2643c0ccc05d595a0047953e
2021-09-29Revert "ART: Removes SuspendCheck for plain loops with a low trip count." Nicolas Geoffray
This reverts commit 3de02fb67de386368c9fe39ab5a0133afcf1d785. Reason for revert: b/201413752 Change-Id: I8a3a56cfb81fa88f49992615696260dfbc79bb67
2021-09-28Don't do a recursive call when there are CHA guards. Nicolas Geoffray
Otherwise we would continue execute the method with invalid inlining optimizations. Test: 832-cha-recursive Bug: 19381779 Change-Id: I57d73828d2a9c30f429cf32906f94244346c1310
2021-09-13ART: Removes SuspendCheck for plain loops with a low trip count. Stelios Ioannou
This change removes SuspendCheck for plain loops with a low trip count. The SuspendCheck in the codegen makes sure that the thread can be interrupted during execution for GC. Not being able to do so might decrease the responsiveness of GC in the case when a very long loop or a long recursion is being executed. However, for plain loops with a small trip count, the removal of SuspendCheck should not affect the GC's responsiveness by a large margin. Consequently, since the thread won't be interrupted for plain loops, it is assumed that the performance might increase by removing SuspendCheck. Test: art/test.py -v -j12 --host --64 -t 2233-checker\ -remove-loop-suspend-check --run-test --optimizing Change-Id: Ic9f1387059669645ad836d8277bfbc7553aa6e2f
2021-07-14Modernize typedefs with `using`. Vladimir Marko
Replace many occurences of `typedef` with `using`. For now, do not update typedefs for function types and aligned types and do not touch some parts such as jvmti or dmtracedump. Test: m Change-Id: Ie97ecbc5abf7e7109ef4b01f208752e2dc26c36d
2021-04-23Clean up Handle<> comparison with null. Vladimir Marko
These operators do not need the mutator lock. Test: buildbot-build.sh Change-Id: I48f51853f1b3c2e56463140f23777ad26d8122f2
2021-03-30Fix simplifier issue with predicated ifield get Alex Light
In cases where all targets of a HPredicatedInstanceFieldGet instruction are known to not be null the simplifier would attempt to replace the default value with a null instruction. This would cause a null-pointer dereference. Correct the simplifier to handle this case correctly. Moved some LSE test helper functions to CommonCompilerTestHelper to avoid duplicating code. Fixed an incorrect (though until now unused) constructor for HPredicatatedInstanceFieldGet (the default value and target we swapped). Test: ./test.py --host Test: ./art/tools/compile_jars.py --profile-file bad-compile.txt ~/imgur.apk Bug: 183942773 Change-Id: I66f4ce37d768d5e457047a3f80bd4cb9aa4546a3
2021-02-05Implement Reference.refersTo() intrinsic. Vladimir Marko
Test: Added tests to 122-npe and 160-read-barrier-stress Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: run-gtests.sh Test: testrunner.py --target --optimizing Bug: 172573708 Change-Id: I8342510565289058df218d3249ffac1eb993ca4f
2021-01-28Avoid potential null dereference Alex Light
In a log statement we were dereferencing a pointer that could potentially be null. Add support for safely dereferencing a pointer for ostreams. Test: ./test.py --host Bug: 67037140 Change-Id: Ibe04811883575902a9b2fe8a064f18de2b2cea7b
2021-01-25Revert^4 "Partial Load Store Elimination" Alex Light
This reverts commit 791df7a161ecfa28eb69862a4bc285282463b960. This unreverts commit fc1ce4e8be0d977e3d41699f5ec746d68f63c024. This unreverts commit b8686ce4c93eba7192ed7ef89e7ffd9f3aa6cd07. We incorrectly failed to include PredicatedInstanceFieldGet in a few conditions, including a DCHECK. This caused tests to fail under the read-barrier-table-lookup configuration. Reason for revert: Fixed 2 incorrect checks Bug: 67037140 Test: ./art/test/testrunner/run_build_test_target.py -j70 art-gtest-read-barrier-table-lookup Change-Id: I32b01b29fb32077fb5074e7c77a0226bd1fcaab4
2021-01-24Revert "Revert^2 "Partial Load Store Elimination"" Nicolas Geoffray
This reverts commit fc1ce4e8be0d977e3d41699f5ec746d68f63c024. Bug: 67037140 Reason for revert: Fails read-barrier-table-lookup tests. Change-Id: I373867c728789bc14a4370b93a045481167d5f76
2021-01-22Revert^2 "Partial Load Store Elimination" Alex Light
This reverts commit 47ac53100303e7e864b7f6d65f17b23088ccf1d6. There was a bug in LSE where we would incorrectly record the shadow$_monitor_ field as not having a default initial value. This caused partial LSE to be unable to compile the Object.identityHashCode function, causing crashes. This issue was fixed in a parent CL. Also updated all Offsets in LSE_test to be outside of the object header regardless of configuration. Test: ./test.py --host Bug: 67037140 Reason for revert: Fixed issue with shadow$_monitor_ field and offsets Change-Id: I4fb2afff4d410da818db38ed833927dfc0f6be33
2021-01-22Revert "Partial Load Store Elimination" Nicolas Geoffray
This reverts commit b8686ce4c93eba7192ed7ef89e7ffd9f3aa6cd07. Bug: 67037140 Reason for revert: Fails a few tests. Change-Id: Icf0635bffbfbba93bf0a5b854a9582c418198136
2021-01-21Partial Load Store Elimination Alex Light
Add partial load-store elimination to the LSE pass. Partial LSE will move object allocations which only escape along certain execution paths closer to the escape point and allow more values to be eliminated. It does this by creating new predicated load and store instructions that are used when an object has only escaped some of the time. In cases where the object has not escaped a default value will be used. Test: ./test.py --host Test: ./test.py --target Bug: 67037140 Change-Id: Idde67eb59ec90de79747cde17b552eec05b58497
2021-01-08Add operator<< for HGraph and HInstructions. Alex Light
Include helpers for printing arguments as well. Test: ./test.py --host Change-Id: I692fd5bd32a8a39da0defd9454d56ccf2480f229
2021-01-06Optimizing: Add debugging output for HInstruction. Vladimir Marko
Allow printing individual instruction and its arguments with the HGraphVisualizer. Arguments are dumped "recursively" (but implemented with a queue instead of actual recursion). For example, printing the Return instruction from the method Main.testLoop17 in 530-checker-lse yields v28 Return [i27] dex_pc:23 loop:none i27 Add [i24,i26] dex_pc:22 loop:none i24 Phi [i5,i15] dex_pc:n/a reg:0 is_catch_phi:false loop:none i5 IntConstant dex_pc:0 1 loop:none i15 IntConstant dex_pc:5 2 loop:none i26 InstanceFieldGet [l6] dex_pc:20 field_name:TestClass.i field_type:Int32 loop:none l6 NullCheck [l1] dex_pc:1 env:[[i5,_,_,l1,i2]] loop:none l1 ParameterValue dex_pc:n/a loop:none Test: Manual; modify LSE to print the instruction above. Change-Id: Iaf41ba62cd6a5a36236ad0abca082ebffcf6a20e
2020-12-01Ensure ClearLoopInformation doesn't require particular ordering Alex Light
The ClearLoopInformation call used to use the RPO list to find blocks which potentially had loop-information. This meant that if one was also clearing the dominance information (which is quite common) one needed to be sure to call ClearLoopInformation before calling ClearDominanceInformation or else loop information will not be fully cleared. This could cause quite perplexing errors if dominance information is recomputed later (also quite common). This error is in fact present in several tests (none of which use loops which is how it got missed). Fix this issue by just looping over all blocks. Also add a new GetActiveBlocks function which does the filtering of null blocks automatically. In many cases (such as these) we use RPO purely because it doesn't require filtering. This should be able to replace these uses. Test: ./test.py --host Change-Id: I60c7defc409111471064e9bf02b7ae3a0eb10584
2020-11-18Revert^4 "Partial LSE analysis & store removal" Alex Light
We incorrectly handled merging unknowns in some situations. Specifically in cases where we are unable to materialize loop-phis we could end up with PureUnknowns which could end up hiding stores that need to be kept. In an unrelated issue we were incorrectly considering some values as escapes when live at the point of an invoke. Since SearchPhiPlaceholdersForKeptStores used a more precise notion of escapes we could end up removing stores without being able to replace the values. This reverts commit 2316b3a0779f3721a78681f5c70ed6624ecaebef. This unreverts commit b6837f0350ff66c13582b0e94178dd5ca283ff0a This reverts commit fe270426c8a2a69a8f669339e83b86fbf40e25a1. This unreverts commit bb6cda60e4418c0ab557ea4090e046bed8206763. Bug: 67037140 Bug: 173120044 Reason for revert: Fixed issue causing incorrect store elimination Test: ./test.py --host Test: Boot cuttlefish atest FrameworksServicesTests:com.android.server.job.BackgroundRestrictionsTest#testPowerWhiteList Change-Id: I2ebae9ccfaf5169d551c5019b547589d0fce1dc9
2020-11-14Revert^3 "Partial LSE analysis & store removal" Alex Light
This reverts commit b6837f0350ff66c13582b0e94178dd5ca283ff0a This unreverts commit fe270426c8a2a69a8f669339e83b86fbf40e25a1. This rereverts commit bb6cda60e4418c0ab557ea4090e046bed8206763. Bug: 67037140 Bug: 173120044 Reason for revert: Git-blame seems to point to the CL as cause of b/173120044. Revert during investigation. Change-Id: I46f557ce79c15f07f4e77aacded1926b192754c3
2020-11-13Revert^2 "Partial LSE analysis & store removal" Alex Light
A ScopedArenaAllocator in a single test was accidentally loaded using operator new which is not supported. This caused a memory leak. This reverts commit fe270426c8a2a69a8f669339e83b86fbf40e25a1. This unreverts commit bb6cda60e4418c0ab557ea4090e046bed8206763. Bug: 67037140 Reason for revert: Fixed memory leak in LoadStoreAnalysisTest.PartialEscape test case Test: SANITIZE_HOST=address ASAN_OPTIONS=detect_leaks=0 m test-art-host-gtest-dependencies Run art_compiler_tests Change-Id: I34fa2079df946ae54b8c91fa771a44d56438a719
2020-11-12Revert "Partial LSE analysis & store removal" Nicolas Geoffray
This reverts commit bb6cda60e4418c0ab557ea4090e046bed8206763. Bug: 67037140 Reason for revert: memory leak detected in the test. Change-Id: I81cc2f61494e96964d8be40389eddcd7c66c9266
2020-11-12Partial LSE analysis & store removal Alex Light
This is the first piece of partial LSE for art. This CL adds analysis tools needed to implement partial LSE. More immediately, it improves LSE so that it will remove stores that are provably non-observable based on the location they occur. For example: ``` Foo o = new Foo(); if (xyz) { check(foo); foo.x++; } else { foo.x = 12; } return foo.x; ``` The store of 12 can be removed because the only escape in this method is unreachable and was not executed by the point we reach the store. The main purpose of this CL is to add the analysis tools needed to implement partial Load-Store elimination. Namely it includes tracking of which blocks are escaping and the groups of blocks that we cannot remove allocations from. The actual impact of this change is incredibly minor, being triggered only once in a AOSP code. go/lem shows only minor effects to compile-time and no effect on the compiled code. See go/lem-allight-partial-lse-2 for numbers. Compile time shows an average of 1.4% regression (max regression is 7% with 0.2 noise). This CL adds a new 'reachability' concept to the HGraph. If this has been calculated it allows one to quickly query whether there is any execution path containing two blocks in a given order. This is used to define a notion of sections of graph from which the escape of some allocation is inevitable. Test: art_compiler_tests Test: treehugger Bug: 67037140 Change-Id: I0edc8d6b73f7dd329cb1ea7923080a0abe913ea6
2020-11-06Remove NeedsDexCache logic from the compiler. Nicolas Geoffray
The compiled code and runtime stubs don't need to have direct access to the dex cache anymore. Test: test.py Change-Id: Id3aab9b10445ba2599e1a9ffd8e36506a745bfec
2020-10-07Change interface conflict stub to take the interface method. Nicolas Geoffray
To avoid doing dex cache lookup, pass the interface method instead. This costs a few hundred KBs on speed compiled APKs (< 0.5% code size), but improves performance when hitting a conflict (as seen on dogfood data). For nterp, we currently pass the conflict method instead of the interface method. We need to handle default methods before optimizing it. This removes our last use of dex cache in compiled code. A follow-up CL will remove the NeedsDexCacheOfDeclaringClass from HInvokeInterface. Test: test.py Change-Id: I3cdd4543ad7d904b3e81950af46a48a48af6991a
2020-09-30Faster access to unresolved classes from compiled code. Vladimir Marko
Add two new load kinds to LoadClass, similar to kBssEntry but using the access-checking entrypoint on the slow-path. One is used for classes that are in the literal package and the other for classes outside the literal package of the compiling class. Associate new .bss entries with these load kinds and update them from entrypoints based on the resolved class properties. If the resolved class is public, both types of entries can be updated, otherwise only the package local entry can be updated and only if the defining class loader of the class is the same as the caller's defining class loader (which is identical for all code in an oat file) because the run time access check for same package requires both class loader and literal package name match. Test: Additional tests in 727-checker-unresolved-class. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: aosp_blueline-userdebug boots. Test: run-gtests.sh Test: testrunner.py --target --optimizing Bug: 161898207 Change-Id: I281e06ac2825caf81c6d7ee3128af833abd39992
2020-09-25Move the resolved_method_reference to HInvoke. Nicolas Geoffray
In order to also be used by HInvokeInterface. Test: test.py Change-Id: If72071a5347a13843f2c3ad8da4af4d6aaee6444
2020-09-23Move MethodLoadKind out of HInvokeStaticOrDirect. Nicolas Geoffray
To prepare for using it in HInvokeInterface. For consistency, also move CodePtrLocation. Test: test.py Change-Id: I84f973764275002e2adb71080ebc833b2bafb975
2020-09-08Pass a full MethodReference of the invoke in HInvoke nodes. Nicolas Geoffray
Cleanup to ensure we don't make mistakes when passing a dex method index to the HInvoke constructor, and we know which dex file it relates to. Test: test.py Change-Id: I625949add88a6b97e1dafeb7aed37961e105d6aa
2020-09-07X86: Implement VarHandle.set() for fields. Andra Danciu
This commit implements VarHandle set access mode for fields (both static and instance). This also implied refactorizing the common parts of get and set access modes (e.g. coordinate type checks). Non-constant Int64 set value is not implemented. Test: ART_HEAP_POISONING=true art/test.py --host --32 -r -t 712-varhandle-invocations Test: ART_HEAP_POISONING=false art/test.py --host --32 -r -t 712-varhandle-invocations Bug: 65872996 Change-Id: I384c09e08f7a772fc7ec372b1ebb5f882ecc5586
2020-08-28X86: Replace VarHandle.get() return type check with CheckCast node Andra Danciu
This commit removes the varType check against the callsite return type. The check is done after by an added HCheckCast node. Test: art/test.py --host --32 -r -t 712-varhandle-invocations Bug: 65872996 Change-Id: If4d966e0087da28349390474188e10dfb6f63832