rtl-optimization/110587 - speedup find_hard_regno_for_1
commitb66e613a1a8d5b8fc9d8b03f7b60260700acf833
authorRichard Biener <rguenther@suse.de>
Tue, 25 Jul 2023 13:36:30 +0000 (25 15:36 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 9 Aug 2023 06:46:58 +0000 (9 08:46 +0200)
treedf8e289d66738028385fbc9c82906d02778900d6
parent0412f0e374de1f66e20c407e0b519324af3fd5b6
rtl-optimization/110587 - speedup find_hard_regno_for_1

The following applies a micro-optimization to find_hard_regno_for_1,
re-ordering the check so we can easily jump-thread by using an else.
This reduces the time spent in this function by 15% for the testcase
in the PR.

PR rtl-optimization/110587
* lra-assigns.cc (find_hard_regno_for_1): Re-order checks.
gcc/lra-assigns.cc