[LRA] Don't count spilling cost for it offmemok
authorJiong Wang <jiong.wang@arm.com>
Tue, 5 Jul 2016 16:05:27 +0000 (16:05 +0000)
committerJiong Wang <jiwang@gcc.gnu.org>
Tue, 5 Jul 2016 16:05:27 +0000 (16:05 +0000)
* lra-constraints.c (process_alt_operands): Don't add spilling cost for
"offmemok".

From-SVN: r238010

gcc/ChangeLog
gcc/lra-constraints.c

index 5e466b7cd7d661823a45bc1fa5d503f4794ac15b..de92a3efb8e1a09d68676445dd53c66193a52edb 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-05  Jiong Wang  <jiong.wang@arm.com>
+
+       * lra-constraints.c (process_alt_operands): Don't add spilling cost for
+       "offmemok".
+
 2016-07-05  Jan Hubicka  <jh@suse.cz>
 
        * tree-scalar-evoluiton.c (simple_iv): Use nowrap_type to check if
index bf08dce2e0a4c2ef4c339aedbda4dba47cba1645..e9d3e43eacef4432dd4c3bbfedf180a10222f4f4 100644 (file)
@@ -2488,7 +2488,9 @@ process_alt_operands (int only_alternative)
 
                 Code below increases the reject for both pseudo and non-pseudo
                 spill.  */
-             if (no_regs_p && !(REG_P (op) && hard_regno[nop] < 0))
+             if (no_regs_p
+                 && !(MEM_P (op) && offmemok)
+                 && !(REG_P (op) && hard_regno[nop] < 0))
                {
                  if (lra_dump_file != NULL)
                    fprintf