diff options
author | 2024-02-09 10:10:18 +0100 | |
---|---|---|
committer | 2024-02-12 15:34:29 +0000 | |
commit | 8e38dd55e9362fe3469d03268c8e7c231f68b316 (patch) | |
tree | e15ad54c5397e7c4daebcf5822563b747af1572f /compiler/jni/quick/calling_convention.h | |
parent | a74f282bb65b838541fd1fb75f584f8a08a67b72 (diff) |
JNI: Keep previous LRT state in callee-save reg.
Golem results for art-opt-cc (higher is better):
linux-armv7 (Odroid-C2) before after
NativeDowncallStaticFast 21.622 21.923 (+1.395%)
NativeDowncallStaticFast6 18.491 18.719 (+1.236%)
NativeDowncallStaticFastRefs6 15.347 15.504 (+1.025%)
NativeDowncallVirtualFast 20.741 21.319 (+2.787%)
NativeDowncallVirtualFast6 18.953 19.183 (+1.218%)
NativeDowncallVirtualFastRefs6 15.500 15.663 (+1.053%)
NativeDowncallStaticNormal 14.620 14.757 (0.9495%)
NativeDowncallStaticNormal6 13.120 13.235 (+0.8823%)
NativeDowncallStaticNormalRefs6 11.454 11.538 (+0.7258%)
NativeDowncallVirtualNormal 14.216 14.486 (+1.898%)
NativeDowncallVirtualNormal6 13.347 13.466 (+0.8978%)
NativeDowncallVirtualNormalRefs6 11.538 11.628 (+0.7752%)
linux-armv7 (Raspberry Pi 4) before after
NativeDowncallStaticFast 43.305 42.331 (-2.250%)
NativeDowncallStaticFast6 35.608 37.369 (+4.945%)
NativeDowncallStaticFastRefs6 31.390 31.793 (+1.285%)
NativeDowncallVirtualFast 33.814 31.825 (-5.882%)
NativeDowncallVirtualFast6 34.311 36.445 (+6.220%)
NativeDowncallVirtualFastRefs6 31.762 32.419 (+2.069%)
NativeDowncallStaticNormal 13.848 14.244 (+2.859%)
NativeDowncallStaticNormal6 13.592 13.725 (+0.9804%)
NativeDowncallStaticNormalRefs6 12.671 12.536 (-1.061%)
NativeDowncallVirtualNormal 13.979 13.848 (-0.9397%)
NativeDowncallVirtualNormal6 13.242 13.592 (+2.647%)
NativeDowncallVirtualNormalRefs6 12.364 12.358 (-0.094%)
linux-armv8 (Odroid-C2) before after
NativeDowncallStaticFast 24.752 25.160 (+1.648%)
NativeDowncallStaticFast6 22.571 22.908 (+1.494%)
NativeDowncallStaticFastRefs6 19.183 19.183 (unchanged)
NativeDowncallVirtualFast 21.622 22.244 (+2.879%)
NativeDowncallVirtualFast6 21.319 21.934 (+2.887%)
NativeDowncallVirtualFastRefs6 17.448 17.848 (+2.296%)
NativeDowncallStaticNormal 17.048 17.250 (+1.183%)
NativeDowncallStaticNormal6 15.992 16.161 (+1.054%)
NativeDowncallStaticNormalRefs6 14.085 14.216 (+0.9314%)
NativeDowncallVirtualNormal 15.504 15.826 (+2.077%)
NativeDowncallVirtualNormal6 15.347 15.663 (+2.064%)
NativeDowncallVirtualNormalRefs6 13.466 13.586 (+0.8859%)
linux-armv8 (Raspberry Pi 4) before after
NativeDowncallStaticFast 38.366 40.796 (+6.335%)
NativeDowncallStaticFast6 38.347 40.419 (+5.405%)
NativeDowncallStaticFastRefs6 31.636 32.528 (+2.820%)
NativeDowncallVirtualFast 35.201 37.406 (+6.266%)
NativeDowncallVirtualFast6 34.000 35.626 (+4.782%)
NativeDowncallVirtualFastRefs6 27.201 27.201 (unchanged)
NativeDowncallStaticNormal 14.808 15.107 (+2.024%)
NativeDowncallStaticNormal6 14.955 14.428 (-3.526%)
NativeDowncallStaticNormalRefs6 14.174 13.855 (-2.254%)
NativeDowncallVirtualNormal 14.735 14.307 (-2.904%)
NativeDowncallVirtualNormal6 14.244 14.385 (+0.9921%)
NativeDowncallVirtualNormalRefs6 14.105 14.244 (+0.9823%)
linux-ia32 before after
NativeDowncallStaticFast 223.66 233.77 (+4.516%)
NativeDowncallStaticFast6 159.76 163.92 (+2.602%)
NativeDowncallStaticFastRefs6 137.16 141.72 (+3.324%)
NativeDowncallVirtualFast 211.79 224.05 (+5.791%)
NativeDowncallVirtualFast6 149.85 154.00 (+2.769%)
NativeDowncallVirtualFastRefs6 132.17 136.93 (+3.603%)
NativeDowncallStaticNormal 51.091 51.091 (unchanged)
NativeDowncallStaticNormal6 45.680 45.703 (+0.0497%)
NativeDowncallStaticNormalRefs6 44.732 45.161 (+0.9606%)
NativeDowncallVirtualNormal 50.450 50.450 (unchanged)
NativeDowncallVirtualNormal6 45.161 45.161 (unchanged)
NativeDowncallVirtualNormalRefs6 44.125 44.147 (+0.496%)
linux-x64 before after
NativeDowncallStaticFast 173.07 181.05 (+4.611%)
NativeDowncallStaticFast6 156.50 161.34 (+3.092%)
NativeDowncallStaticFastRefs6 130.37 131.61 (+0.9499%)
NativeDowncallVirtualFast 169.00 174.83 (+3.447%)
NativeDowncallVirtualFast6 148.13 149.35 (+0.8243%)
NativeDowncallVirtualFastRefs6 127.31 130.11 (+2.200%)
NativeDowncallStaticNormal 47.952 47.952 (unchanged)
NativeDowncallStaticNormal6 46.789 46.789 (unchanged)
NativeDowncallStaticNormalRefs6 44.643 44.643 (unchanged)
NativeDowncallVirtualNormal 47.358 47.358 (unchanged)
NativeDowncallVirtualNormal6 45.703 45.680 (-0.0497%)
NativeDowncallVirtualNormalRefs6 44.643 44.643 (unchanged)
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 172332525
Change-Id: I9606412c658cae8b7583308facf5ba095a982349
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r-- | compiler/jni/quick/calling_convention.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h index 21336edb44..b8b4cc14b1 100644 --- a/compiler/jni/quick/calling_convention.h +++ b/compiler/jni/quick/calling_convention.h @@ -324,9 +324,11 @@ class JniCallingConvention : public CallingConvention { virtual ArrayRef<const ManagedRegister> CalleeSaveRegisters() const = 0; // Subset of core callee save registers that can be used for arbitrary purposes after - // constructing the JNI transition frame. These should be managed callee-saves as well. + // constructing the JNI transition frame. These should be both managed and native callee-saves. // These should not include special purpose registers such as thread register. - // JNI compiler currently requires at least 3 callee save scratch registers. + // JNI compiler currently requires at least 4 callee save scratch registers, except for x86 + // where we have only 3 such registers but all args are passed on stack, so the method register + // is never clobbered by argument moves and does not need to be preserved elsewhere. virtual ArrayRef<const ManagedRegister> CalleeSaveScratchRegisters() const = 0; // Subset of core argument registers that can be used for arbitrary purposes after |