Commit aecd88f7 by Zhenqiang Chen Committed by Zhenqiang Chen

arm.c: #include "tm-constrs.h"

2014-09-22  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	* config/arm/arm.c: #include "tm-constrs.h"
	(thumb1_size_rtx_costs): Adjust rtx costs.

From-SVN: r215444
parent 598a1586
2014-09-22 Zhenqiang Chen <zhenqiang.chen@arm.com>
* config/arm/arm.c: #include "tm-constrs.h"
(thumb1_size_rtx_costs): Adjust rtx costs.
2014-09-22 Hans-Peter Nilsson <hp@axis.com> 2014-09-22 Hans-Peter Nilsson <hp@axis.com>
* configure.ac (target_header_dir): Move block defining * configure.ac (target_header_dir): Move block defining
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include "dumpfile.h" #include "dumpfile.h"
#include "gimple-expr.h" #include "gimple-expr.h"
#include "builtins.h" #include "builtins.h"
#include "tm-constrs.h"
/* Forward definitions of types. */ /* Forward definitions of types. */
typedef struct minipool_node Mnode; typedef struct minipool_node Mnode;
...@@ -8927,9 +8928,11 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer) ...@@ -8927,9 +8928,11 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
/* A SET doesn't have a mode, so let's look at the SET_DEST to get /* A SET doesn't have a mode, so let's look at the SET_DEST to get
the mode. */ the mode. */
words = ARM_NUM_INTS (GET_MODE_SIZE (GET_MODE (SET_DEST (x)))); words = ARM_NUM_INTS (GET_MODE_SIZE (GET_MODE (SET_DEST (x))));
return (COSTS_N_INSNS (words) return COSTS_N_INSNS (words)
+ 4 * ((MEM_P (SET_SRC (x))) + COSTS_N_INSNS (1) * (satisfies_constraint_J (SET_SRC (x))
+ MEM_P (SET_DEST (x)))); || satisfies_constraint_K (SET_SRC (x))
/* thumb1_movdi_insn. */
|| ((words > 1) && MEM_P (SET_SRC (x))));
case CONST_INT: case CONST_INT:
if (outer == SET) if (outer == SET)
...@@ -8982,16 +8985,14 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer) ...@@ -8982,16 +8985,14 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
case AND: case AND:
case XOR: case XOR:
case IOR: case IOR:
/* XXX guess. */ return COSTS_N_INSNS (1);
return 8;
case MEM: case MEM:
/* XXX another guess. */ return (COSTS_N_INSNS (1)
/* Memory costs quite a lot for the first word, but subsequent words + COSTS_N_INSNS (1)
load at the equivalent of a single insn each. */ * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD)
return (10 + 4 * ((GET_MODE_SIZE (mode) - 1) / UNITS_PER_WORD)
+ ((GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x)) + ((GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
? 4 : 0)); ? COSTS_N_INSNS (1) : 0));
case IF_THEN_ELSE: case IF_THEN_ELSE:
/* XXX a guess. */ /* XXX a guess. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment