The various TARGET_ASM_..._MAX_SKIP hooks take an insn

gcc/ChangeLog:
	* config/rs6000/rs6000.c (rs6000_loop_align_max_skip): Strengthen
	param "label" from rtx to rtx_insn *.
	* config/rx/rx.c (rx_max_skip_for_label): Likewise for param "lab"
	and local "op".
	* doc/tm.texi (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): Autogenerated changes.
	(TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Likewise.
	(TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Likewise.
	(TARGET_ASM_LABEL_ALIGN_MAX_SKIP): Likewise.
	* final.c (default_label_align_after_barrier_max_skip): Strengthen
	param from rtx to rtx_insn *.
	(default_loop_align_max_skip): Likewise.
	(default_label_align_max_skip): Likewise.
	(default_jump_align_max_skip): Likewise.
	* target.def (label_align_after_barrier_max_skip): Likewise.
	(loop_align_max_skip): Likewise.
	(label_align_max_skip): Likewise.
	(jump_align_max_skip): Likewise.
	* targhooks.h (default_label_align_after_barrier_max_skip):
	Likewise.
	(default_loop_align_max_skip): Likewise.
	(default_label_align_max_skip): Likewise.
	(default_jump_align_max_skip): Likewise.

From-SVN: r215270
This commit is contained in:
David Malcolm 2014-09-15 15:57:31 +00:00 committed by David Malcolm
parent c1ce59ab7f
commit 9158a0d8c7
7 changed files with 45 additions and 20 deletions

View File

@ -1,3 +1,28 @@
2014-09-15 David Malcolm <dmalcolm@redhat.com>
* config/rs6000/rs6000.c (rs6000_loop_align_max_skip): Strengthen
param "label" from rtx to rtx_insn *.
* config/rx/rx.c (rx_max_skip_for_label): Likewise for param "lab"
and local "op".
* doc/tm.texi (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): Autogenerated changes.
(TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Likewise.
(TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Likewise.
(TARGET_ASM_LABEL_ALIGN_MAX_SKIP): Likewise.
* final.c (default_label_align_after_barrier_max_skip): Strengthen
param from rtx to rtx_insn *.
(default_loop_align_max_skip): Likewise.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
* target.def (label_align_after_barrier_max_skip): Likewise.
(loop_align_max_skip): Likewise.
(label_align_max_skip): Likewise.
(jump_align_max_skip): Likewise.
* targhooks.h (default_label_align_after_barrier_max_skip):
Likewise.
(default_loop_align_max_skip): Likewise.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
2014-09-15 David Malcolm <dmalcolm@redhat.com>
* config/arc/arc.c (arc_can_follow_jump): Strengthen both params

View File

@ -4134,7 +4134,7 @@ rs6000_loop_align (rtx label)
/* Implement TARGET_LOOP_ALIGN_MAX_SKIP. */
static int
rs6000_loop_align_max_skip (rtx label)
rs6000_loop_align_max_skip (rtx_insn *label)
{
return (1 << rs6000_loop_align (label)) - 1;
}

View File

@ -3207,15 +3207,15 @@ rx_align_for_label (rtx lab, int uses_threshold)
}
static int
rx_max_skip_for_label (rtx lab)
rx_max_skip_for_label (rtx_insn *lab)
{
int opsize;
rtx op;
rtx_insn *op;
if (optimize_size)
return 0;
if (lab == NULL_RTX)
if (lab == NULL)
return 0;
op = lab;

View File

@ -8871,7 +8871,7 @@ to set the variable @var{align_jumps} in the target's
selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation.
@end defmac
@deftypefn {Target Hook} int TARGET_ASM_JUMP_ALIGN_MAX_SKIP (rtx @var{label})
@deftypefn {Target Hook} int TARGET_ASM_JUMP_ALIGN_MAX_SKIP (rtx_insn *@var{label})
The maximum number of bytes to skip before @var{label} when applying
@code{JUMP_ALIGN}. This works only if
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
@ -8886,7 +8886,7 @@ to be done at such a time. Most machine descriptions do not currently
define the macro.
@end defmac
@deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP (rtx @var{label})
@deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP (rtx_insn *@var{label})
The maximum number of bytes to skip before @var{label} when applying
@code{LABEL_ALIGN_AFTER_BARRIER}. This works only if
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
@ -8906,7 +8906,7 @@ to set the variable @code{align_loops} in the target's
selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation.
@end defmac
@deftypefn {Target Hook} int TARGET_ASM_LOOP_ALIGN_MAX_SKIP (rtx @var{label})
@deftypefn {Target Hook} int TARGET_ASM_LOOP_ALIGN_MAX_SKIP (rtx_insn *@var{label})
The maximum number of bytes to skip when applying @code{LOOP_ALIGN} to
@var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is
defined.
@ -8923,7 +8923,7 @@ to set the variable @code{align_labels} in the target's
selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation.
@end defmac
@deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_MAX_SKIP (rtx @var{label})
@deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_MAX_SKIP (rtx_insn *@var{label})
The maximum number of bytes to skip when applying @code{LABEL_ALIGN}
to @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN}
is defined.

View File

@ -499,25 +499,25 @@ get_attr_min_length (rtx insn)
#endif
int
default_label_align_after_barrier_max_skip (rtx insn ATTRIBUTE_UNUSED)
default_label_align_after_barrier_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED)
{
return 0;
}
int
default_loop_align_max_skip (rtx insn ATTRIBUTE_UNUSED)
default_loop_align_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED)
{
return align_loops_max_skip;
}
int
default_label_align_max_skip (rtx insn ATTRIBUTE_UNUSED)
default_label_align_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED)
{
return align_labels_max_skip;
}
int
default_jump_align_max_skip (rtx insn ATTRIBUTE_UNUSED)
default_jump_align_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED)
{
return align_jumps_max_skip;
}

View File

@ -72,7 +72,7 @@ DEFHOOK
"The maximum number of bytes to skip before @var{label} when applying\n\
@code{LABEL_ALIGN_AFTER_BARRIER}. This works only if\n\
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.",
int, (rtx label),
int, (rtx_insn *label),
default_label_align_after_barrier_max_skip)
/* The maximum number of bytes to skip when applying
@ -82,7 +82,7 @@ DEFHOOK
"The maximum number of bytes to skip when applying @code{LOOP_ALIGN} to\n\
@var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is\n\
defined.",
int, (rtx label),
int, (rtx_insn *label),
default_loop_align_max_skip)
/* The maximum number of bytes to skip when applying
@ -92,7 +92,7 @@ DEFHOOK
"The maximum number of bytes to skip when applying @code{LABEL_ALIGN}\n\
to @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN}\n\
is defined.",
int, (rtx label),
int, (rtx_insn *label),
default_label_align_max_skip)
/* The maximum number of bytes to skip when applying
@ -102,7 +102,7 @@ DEFHOOK
"The maximum number of bytes to skip before @var{label} when applying\n\
@code{JUMP_ALIGN}. This works only if\n\
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.",
int, (rtx label),
int, (rtx_insn *label),
default_jump_align_max_skip)
/* Try to output the assembler code for an integer object whose

View File

@ -189,10 +189,10 @@ extern enum unwind_info_type default_debug_unwind_info (void);
extern void default_canonicalize_comparison (int *, rtx *, rtx *, bool);
extern int default_label_align_after_barrier_max_skip (rtx);
extern int default_loop_align_max_skip (rtx);
extern int default_label_align_max_skip (rtx);
extern int default_jump_align_max_skip (rtx);
extern int default_label_align_after_barrier_max_skip (rtx_insn *);
extern int default_loop_align_max_skip (rtx_insn *);
extern int default_label_align_max_skip (rtx_insn *);
extern int default_jump_align_max_skip (rtx_insn *);
extern section * default_function_section(tree decl, enum node_frequency freq,
bool startup, bool exit);
extern enum machine_mode default_dwarf_frame_reg_mode (int);