Re: [PATCH] delete last traces of GO_IF_MODE_DEPENDENT_ADDRESS

2012-07-30 Thread Richard Henderson
On 2012-07-27 16:21, Nathan Froyd wrote:
   * defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
   * targhooks.c (default_mode_dependent_address_p): Delete code
   for GO_IF_MODE_DEPENDENT_ADDRESS.
   * system.h (GO_IF_MODE_DEPENDENT_ADDRESS): Poison.
   * doc/tm.texi.in (GO_IF_MODE_DEPENDENT_ADDRESS): Delete documention.
   * doc/tm.texi: Regenerate.
   * config/alpha.h (GO_IF_MODE_DEPENDENT_ADDRESS): Move code to...
   * config/alpha.c (alpha_mode_dependent_address_p): ...here.  New
   function.
   (TARGET_MODE_DEPENDENT_ADDRESS_P): Define.
   * config/cr16/cr16.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
   * config/mep/mep.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
   * config/vax/vax-protos.h (vax_mode_dependent_address_p): Delete.
   * config/vax/vax.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
   * config/vax/vax.c (vax_mode_dependent_address_p): Make static.
   Take a const_rtx.
   (TARGET_MODE_DEPENDENT_ADDRESS_P): Define.

Ok.


r~


[PATCH] delete last traces of GO_IF_MODE_DEPENDENT_ADDRESS

2012-07-27 Thread Nathan Froyd
Subject says it all, really.  Two targets with redundant definitions, and
two targets with trivial definitions.  Time to remove this.

Tested on x86_64-unknown-linux-gnu.  Crosses to {alpha,vax}-linux-gnu built
as well.  OK to commit?

-Nathan

* defaults.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
* targhooks.c (default_mode_dependent_address_p): Delete code
for GO_IF_MODE_DEPENDENT_ADDRESS.
* system.h (GO_IF_MODE_DEPENDENT_ADDRESS): Poison.
* doc/tm.texi.in (GO_IF_MODE_DEPENDENT_ADDRESS): Delete documention.
* doc/tm.texi: Regenerate.
* config/alpha.h (GO_IF_MODE_DEPENDENT_ADDRESS): Move code to...
* config/alpha.c (alpha_mode_dependent_address_p): ...here.  New
function.
(TARGET_MODE_DEPENDENT_ADDRESS_P): Define.
* config/cr16/cr16.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
* config/mep/mep.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
* config/vax/vax-protos.h (vax_mode_dependent_address_p): Delete.
* config/vax/vax.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
* config/vax/vax.c (vax_mode_dependent_address_p): Make static.
Take a const_rtx.
(TARGET_MODE_DEPENDENT_ADDRESS_P): Define.

---
 gcc/config/alpha/alpha.c|   12 
 gcc/config/alpha/alpha.h|7 ---
 gcc/config/cr16/cr16.h  |4 
 gcc/config/mep/mep.h|2 --
 gcc/config/vax/vax-protos.h |1 -
 gcc/config/vax/vax.c|7 +--
 gcc/config/vax/vax.h|5 -
 gcc/defaults.h  |7 ---
 gcc/doc/tm.texi |   18 --
 gcc/doc/tm.texi.in  |   18 --
 gcc/system.h|3 ++-
 gcc/targhooks.c |   12 
 12 files changed, 19 insertions(+), 77 deletions(-)

diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 5617ea3..6d455ef 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1038,6 +1038,16 @@ alpha_legitimize_address (rtx x, rtx oldx 
ATTRIBUTE_UNUSED,
   return new_x ? new_x : x;
 }
 
+/* Return true if ADDR has an effect that depends on the machine mode it
+   is used for.  On the Alpha this is true only for the unaligned modes.
+   We can simplify the test since we know that the address must be valid.  */
+
+static bool
+alpha_mode_dependent_address_p (const_rtx addr)
+{
+  return GET_CODE (addr) == AND;
+}
+
 /* Primarily this is required for TLS symbols, but given that our move
patterns *ought* to be able to handle any symbol at any time, we
should never be spilling symbolic operands to the constant pool, ever.  */
@@ -9709,6 +9719,8 @@ alpha_conditional_register_usage (void)
 
 #undef TARGET_LEGITIMIZE_ADDRESS
 #define TARGET_LEGITIMIZE_ADDRESS alpha_legitimize_address
+#undef TARGET_MODE_DEPENDENT_ADDRESS_P
+#define TARGET_MODE_DEPENDENT_ADDRESS_P alpha_mode_dependent_address_p
 
 #undef TARGET_ASM_FILE_START
 #define TARGET_ASM_FILE_START alpha_file_start
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 8520ea8..cdb7c49 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -851,13 +851,6 @@ do {   
 \
 }   \
 } while (0)
 
-/* Go to LABEL if ADDR (a legitimate address expression)
-   has an effect that depends on the machine mode it is used for.
-   On the Alpha this is true only for the unaligned modes.   We can
-   simplify this test since we know that the address must be valid.  */
-
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  \
-{ if (GET_CODE (ADDR) == AND) goto LABEL; }
 
 /* Specify the machine mode that this machine uses
for the index in the tablejump instruction.  */
diff --git a/gcc/config/cr16/cr16.h b/gcc/config/cr16/cr16.h
index 54794e1..cf5bdf1 100644
--- a/gcc/config/cr16/cr16.h
+++ b/gcc/config/cr16/cr16.h
@@ -460,10 +460,6 @@ struct cumulative_args
 #define REG_OK_FOR_INDEX_P(X)   1
 #endif /* not REG_OK_STRICT.  */
 
-/* Go to LABEL if ADDR (a legitimate address expression) has 
-   an effect that depends on the machine mode it is used for.  */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
-
 /* Assume best case (branch predicted).  */
 #define BRANCH_COST(speed_p, predictable_p)   2
 
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index ad5b36d..920120c 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -561,8 +561,6 @@ typedef struct
   if (mep_legitimize_reload_address ((X), (MODE), (OPNUM), (TYPE), 
(IND_LEVELS))) \
 goto WIN
 
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
-
 #define SELECT_CC_MODE(OP, X, Y)  CCmode
 
 
diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h
index 3f24794..5363877 100644
--- a/gcc/config/vax/vax-protos.h
+++ b/gcc/config/vax/vax-protos.h
@@ -19,7 +19,6 @@ along with GCC; see the file COPYING3.  If not see

Re: [PATCH] delete last traces of GO_IF_MODE_DEPENDENT_ADDRESS

2012-07-27 Thread Jan-Benedict Glaw
On Fri, 2012-07-27 19:21:40 -0400, Nathan Froyd froy...@mozilla.com wrote:
   * config/vax/vax-protos.h (vax_mode_dependent_address_p): Delete.
   * config/vax/vax.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
   * config/vax/vax.c (vax_mode_dependent_address_p): Make static.
   Take a const_rtx.
   (TARGET_MODE_DEPENDENT_ADDRESS_P): Define.

The VAX parts look good to me, but Matt has to decide on that.

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of: really soon now:  an unspecified period of time, 
likly to
the second  : be greater than any reasonable 
definition
  of soon.


signature.asc
Description: Digital signature