Simplify ira_setup_alts
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 1 Jul 2019 08:58:10 +0000 (08:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 1 Jul 2019 08:58:10 +0000 (08:58 +0000)
commit06a65e803ed06f3ad1fd8e5f90db03aa0a7e5414
tree6940b92b1a8f077ca6550349583923c1ea3259c3
parent73bb8fe9e915cf3219f16afdc61c308c08aa7659
Simplify ira_setup_alts

ira_setup_alts has its own code to calculate the start of the
constraint string for each operand/alternative combination,
but preprocess_constraints now provides that information in (almost)
constant time for non-asm instructions.  Using it here should speed
up the common case at the cost of potentially slowing down the handling
of asm statements.

The real reason for doing this is that a later patch wants to use
more of the operand_alternative information.

2019-07-01  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* ira.c (ira_setup_alts): Use preprocess_constraints to get the
constraint string for each operand/alternative combo.  Only handle
'%' at the start of constraint strings, and look for it outside
the main loop.

From-SVN: r272848
gcc/ChangeLog
gcc/ira.c