gcc/
* config/nds32/nds32.c (nds32_register_priority): Modify cost.
From-SVN: r258619
+2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * config/nds32/nds32.c (nds32_register_priority): Modify cost.
+
2018-03-17 Jakub Jelinek <jakub@redhat.com>
PR target/84902
nds32_register_priority (int hard_regno)
{
/* Encourage to use r0-r7 for LRA when optimize for size. */
- if (optimize_size && hard_regno < 8)
- return 4;
- return 3;
+ if (optimize_size)
+ {
+ if (hard_regno < 8)
+ return 4;
+ else if (hard_regno < 16)
+ return 3;
+ else if (hard_regno < 28)
+ return 2;
+ else
+ return 1;
+ }
+ else
+ {
+ if (hard_regno > 27)
+ return 1;
+ else
+ return 4;
+ }
}
\f