bfin.c (bfin_register_move_cost): Test for subsets of DREGS rather than comparing directly.
* config/bfin/bfin.c (bfin_register_move_cost): Test for subsets of DREGS rather than comparing directly. Remove code that tries to account for latencies. From-SVN: r146956
This commit is contained in:
parent
bd0a4cabe3
commit
c5d9672394
@ -5,6 +5,10 @@
|
||||
Remove special case testing for last insn of inner loops. Don't fail if
|
||||
the loop ends with a jump, emit an extra nop instead.
|
||||
|
||||
* config/bfin/bfin.c (bfin_register_move_cost): Test for subsets of
|
||||
DREGS rather than comparing directly. Remove code that tries to
|
||||
account for latencies.
|
||||
|
||||
2009-04-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/39941
|
||||
|
@ -2331,20 +2331,14 @@ bfin_register_move_cost (enum machine_mode mode,
|
||||
enum reg_class class1, enum reg_class class2)
|
||||
{
|
||||
/* These need secondary reloads, so they're more expensive. */
|
||||
if ((class1 == CCREGS && class2 != DREGS)
|
||||
|| (class1 != DREGS && class2 == CCREGS))
|
||||
if ((class1 == CCREGS && !reg_class_subset_p (class2, DREGS))
|
||||
|| (class2 == CCREGS && !reg_class_subset_p (class1, DREGS)))
|
||||
return 4;
|
||||
|
||||
/* If optimizing for size, always prefer reg-reg over reg-memory moves. */
|
||||
if (optimize_size)
|
||||
return 2;
|
||||
|
||||
/* There are some stalls involved when moving from a DREG to a different
|
||||
class reg, and using the value in one of the following instructions.
|
||||
Attempt to model this by slightly discouraging such moves. */
|
||||
if (class1 == DREGS && class2 != DREGS)
|
||||
return 2 * 2;
|
||||
|
||||
if (GET_MODE_CLASS (mode) == MODE_INT)
|
||||
{
|
||||
/* Discourage trying to use the accumulators. */
|
||||
|
Loading…
Reference in New Issue
Block a user