From: David Malcolm Date: Mon, 15 Sep 2014 15:57:31 +0000 (+0000) Subject: The various TARGET_ASM_..._MAX_SKIP hooks take an insn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9158a0d8c7cf13071568c33a9bd282941731b2a1;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 93f19406a46..f7f010e4674 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,28 @@ +2014-09-15 David Malcolm + + * 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 * config/arc/arc.c (arc_can_follow_jump): Strengthen both params diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2141bc04503..eca7aec4fd1 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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; } diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 549a44320a6..e177facc7b8 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -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; diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 1a19dcd9b3b..396909f2619 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -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. diff --git a/gcc/final.c b/gcc/final.c index 1b50e74bbf0..d17b61b5506 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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; } diff --git a/gcc/target.def b/gcc/target.def index 752ef6bfea1..ce11eae444d 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -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 diff --git a/gcc/targhooks.h b/gcc/targhooks.h index 581eac6d47f..dad9520c910 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -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);