+2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * calls.c (prepare_call_address): Remove ifdef NO_FUNCTION_CSE.
+ * cse.c (fold_rtx): Likewise.
+ * config/alpha/alpha.h (NO_FUNCTION_CSE): Define to 1.
+ * config/arc/arc.h (NO_FUNCTION_CSE): Likewise.
+ * config/avr/avr.h (NO_FUNCTION_CSE): Likewise.
+ * config/cr16/cr16.h (NO_FUNCTION_CSE): Likewise.
+ * config/epiphany/epiphany.h (NO_FUNCTION_CSE): Likewise.
+ * config/frv/frv.h (NO_FUNCTION_CSE): Likewise.
+ * config/h8300/h8300.h (NO_FUNCTION_CSE): Likewise.
+ * config/i386/i386.h (NO_FUNCTION_CSE): Likewise.
+ * config/ia64/ia64.h (NO_FUNCTION_CSE): Likewise.
+ * config/lm32/lm32.h (enum reg_class) (NO_FUNCTION_CSE):
+ * Likewise.
+ * config/m32r/m32r.h (NO_FUNCTION_CSE): Likewise.
+ * config/mep/mep.h (NO_FUNCTION_CSE): Likewise.
+ * config/mn10300/mn10300.h (NO_FUNCTION_CSE): Likewise.
+ * config/nds32/nds32.h (NO_FUNCTION_CSE): Likewise.
+ * config/nios2/nios2.h (NO_FUNCTION_CSE): Likewise.
+ * config/pa/pa.h (NO_FUNCTION_CSE): Likewise.
+ * config/rs6000/rs6000.h (NO_FUNCTION_CSE): Likewise.
+ * config/s390/s390.h (NO_FUNCTION_CSE): Likewise.
+ * config/sparc/sparc.h (NO_FUNCTION_CSE): Likewise.
+ * config/spu/spu.h (NO_FUNCTION_CSE): Likewise.
+ * config/stormy16/stormy16.h (NO_FUNCTION_CSE): Likewise.
+ * config/v850/v850.h (NO_FUNCTION_CSE): Likewise.
+ * defaults.h (NO_FUNCTION_CSE): Provide default definition to 0.
+ * doc/tm.texi: Regenerate.
+ * doc/tm.texi.in: Document NO_FUNCTION_CSE is always defined to
+ either true or false.
+
2015-04-27 Jeff Law <law@redhat.com>
PR tree-optimization/65217
: memory_address (FUNCTION_MODE, funexp));
else if (! sibcallp)
{
-#ifndef NO_FUNCTION_CSE
- if (optimize && ! flag_no_function_cse)
+ if (!NO_FUNCTION_CSE && optimize && ! flag_no_function_cse)
funexp = force_reg (Pmode, funexp);
-#endif
}
if (static_chain_value != 0
then copy it into a register, thus actually letting the address be
cse'ed. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Define this to be nonzero if shift instructions ignore all but the low-order
few bits. */
/* Define this macro if it is as good or better to call a constant
function address than to call an address kept in a register. */
/* On the ARC, calling through registers is slow. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Section selection. */
/* WARNING: These section names also appear in dwarfout.c. */
#define SLOW_BYTE_ACCESS 0
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
#define REGISTER_TARGET_PRAGMAS() \
do { \
/* It is as good or better to call a constant function address than to
call an address kept in a register. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Dividing the output into sections. */
/* Define this macro if it is as good or better to call a constant
function address than to call an address kept in a register. */
/* On the EPIPHANY, calling through registers is slow. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Section selection. */
/* WARNING: These section names also appear in dwarf2out.c. */
/* Define this macro if it is as good or better to call a constant function
address than to call an address kept in a register. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Dividing the output into sections. */
Calls through a register are cheaper than calls to named
functions; however, the register pressure this causes makes
CSEing of function addresses generally a lose. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Target machine storage layout */
Desirable on the 386 because a CALL with a constant address is
faster than one with a register address. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison.
Indirect function calls are more expensive that direct function calls, so
don't cse function addresses. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Dividing the output into sections. */
#define SLOW_BYTE_ACCESS 1
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
#define BRANCH_COST(speed_p, predictable_p) 4
/* Define this macro if it is as good or better to call a constant
function address than to call an address kept in a register. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Section selection. */
/* Define this macro if it is as good or better to call a constant function
address than to call an address kept in a register. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
#define TEXT_SECTION_ASM_OP "\t.text\n\t.core"
than accessing full words. */
#define SLOW_BYTE_ACCESS 1
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* According expr.c, a value of around 6 should minimize code size, and
for the MN10300 series, that's our primary concern. */
#define SLOW_BYTE_ACCESS 1
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Adjusting the Instruction Scheduler. */
/* It is as good to call a constant function address as to call an address
kept in a register. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Position independent code. */
shouldn't be put through pseudo regs where they can be cse'd.
Desirable on machines where ordinary constants are expensive
but a CALL with constant address is cheap. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Define this to be nonzero if shift instructions ignore all but the low-order
few bits. */
shouldn't be put through pseudo regs where they can be cse'd.
Desirable on machines where ordinary constants are expensive
but a CALL with constant address is cheap. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* Define this to be nonzero if shift instructions ignore all but the low-order
few bits.
#define MAX_MOVE_MAX 16
/* Don't perform CSE on function addresses. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* This value is used in tree-sra to decide whether it might benefical
to split a struct move into several word-size moves. For S/390
shouldn't be put through pseudo regs where they can be cse'd.
Desirable on machines where ordinary constants are expensive
but a CALL with constant address is cheap. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* The _Q_* comparison libcalls return booleans. */
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode)
#define MOVE_RATIO(speed) ((speed)? 32 : 4)
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Sections */
#define SLOW_BYTE_ACCESS 0
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
\f
/* Dividing the output into sections. */
/* Indirect calls are expensive, never turn a direct call
into an indirect call. */
-#define NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE 1
/* The four different data regions on the v850. */
typedef enum
}
return x;
-#ifdef NO_FUNCTION_CSE
case CALL:
- if (CONSTANT_P (XEXP (XEXP (x, 0), 0)))
+ if (NO_FUNCTION_CSE && CONSTANT_P (XEXP (XEXP (x, 0), 0)))
return x;
break;
-#endif
/* Anything else goes through the loop below. */
default:
#define INSN_REFERENCES_ARE_DELAYED(INSN) false
#endif
+#ifndef NO_FUNCTION_CSE
+#define NO_FUNCTION_CSE false
+#endif
+
#ifdef GCC_INSN_FLAGS_H
/* Dependent default target macro definitions
@end defmac
@defmac NO_FUNCTION_CSE
-Define this macro if it is as good or better to call a constant
+Define this macro to be true if it is as good or better to call a constant
function address than to call an address kept in a register.
@end defmac
@end defmac
@defmac NO_FUNCTION_CSE
-Define this macro if it is as good or better to call a constant
+Define this macro to be true if it is as good or better to call a constant
function address than to call an address kept in a register.
@end defmac