[PATCH 3/4] The various TARGET_ASM_..._MAX_SKIP hooks take an insn

David Malcolm dmalcolm@redhat.com
Fri Sep 12 20:33:00 GMT 2014


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.
---
 gcc/config/rs6000/rs6000.c | 2 +-
 gcc/config/rx/rx.c         | 6 +++---
 gcc/doc/tm.texi            | 8 ++++----
 gcc/final.c                | 8 ++++----
 gcc/target.def             | 8 ++++----
 gcc/targhooks.h            | 8 ++++----
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2141bc0..eca7aec 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 549a443..e177fac 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 1a19dcd..396909f 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 1b50e74..d17b61b 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 752ef6b..ce11eae 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 581eac6..dad9520 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);
-- 
1.8.5.3



More information about the Gcc-patches mailing list