RFR (trivial): 8234228: AArch64: Clean up redundant temp vars in generate_compare_long_string_different_encoding
Patrick Zhang OS
patrick at os.amperecomputing.com
Mon Dec 2 03:18:58 UTC 2019
Ping...
Please help review, thanks.
Regards
Patrick
-----Original Message-----
From: hotspot-compiler-dev <hotspot-compiler-dev-bounces at openjdk.java.net> On Behalf Of Patrick Zhang OS
Sent: Friday, November 15, 2019 6:54 PM
To: hotspot-compiler-dev at openjdk.java.net; aarch64-port-dev at openjdk.java.net
Subject: RFR (trivial): 8234228: AArch64: Clean up redundant temp vars in generate_compare_long_string_different_encoding
Hi Reviewers,
This is a simple patch which cleans up some redundant temp vars and related instructions in generate_compare_long_string_different_encoding.
JBS: https://bugs.openjdk.java.net/browse/JDK-8234228
Webrev: http://cr.openjdk.java.net/~qpzhang/8234228/webrev.01
In generate_compare_long_string_different_encoding, the two Register vars strU and strL were used to record the pointers of the last 4 characters for the final comparisons. strU has been no use since the latest code updates as the chars got pre-loaded (r12) by compare_string_16_x_LU early, and strL is redundant too since the pointer is available in r11. Cleaning up these can save two add, two temp vars, and replace two sub with mov.
In addition, r10 in compare_string_16_x_LU is not used, cleaned the temp var too.
Tested jtreg tier1, and hotspot runtime/compiler, no new failures found.
Double checked with string intrinsics cases under [1], no regression found.
Ran [2] CompareToBench LU/UL as performance check, no regression found, and slight gains with some input sizes
[1] http://hg.openjdk.java.net/jdk/jdk/file/3df2bf731a87/test/hotspot/jtreg/compiler/intrinsics/string
[2] http://cr.openjdk.java.net/~shade/density/string-density-bench.jar
Regards
Patrick
More information about the hotspot-compiler-dev
mailing list