[Janitor] Remove MAX_INTEGER_COMPUTATION_MODE

Andreas Jaeger aj@suse.de
Sun Jun 8 13:03:00 GMT 2003


This macro is not defined anywhere.

Bootstrapped/Regtested i686-linux-gnu.  Ok to commit?

Andreas

2003-06-08  Andreas Jaeger  <aj@suse.de>

	* tree.h: Remove check_max_integer_computation_mode declaration.

	* expr.c (check_max_integer_computation_mode): Remove.
	(expand_expr): Remove code dependend on
	MAX_INTEGER_COMPUTATION_MODE.

	* dojump.c (do_jump): Remove code dependend on
	MAX_INTEGER_COMPUTATION_MODE.
	* fold-const.c (fold): Likewise.

	* doc/tm.texi (Misc): Remove MAX_INTEGER_COMPUTATION_MODE.

============================================================
Index: gcc/tree.h
--- gcc/tree.h	6 Jun 2003 17:03:08 -0000	1.407
+++ gcc/tree.h	8 Jun 2003 08:26:23 -0000
@@ -2871,7 +2871,6 @@ extern void indent_to			PARAMS ((FILE *,
 extern int apply_args_register_offset		PARAMS ((int));
 extern rtx expand_builtin_return_addr
 	PARAMS ((enum built_in_function, int, rtx));
-extern void check_max_integer_computation_mode	PARAMS ((tree));
 
 /* In emit-rtl.c */
 extern void start_sequence_for_rtl_expr		PARAMS ((tree));
============================================================
Index: gcc/expr.c
--- gcc/expr.c	3 Jun 2003 17:13:06 -0000	1.546
+++ gcc/expr.c	8 Jun 2003 08:26:29 -0000
@@ -6397,60 +6397,6 @@ var_rtx (exp)
     }
 }
 
-#ifdef MAX_INTEGER_COMPUTATION_MODE
-
-void
-check_max_integer_computation_mode (exp)
-     tree exp;
-{
-  enum tree_code code;
-  enum machine_mode mode;
-
-  /* Strip any NOPs that don't change the mode.  */
-  STRIP_NOPS (exp);
-  code = TREE_CODE (exp);
-
-  /* We must allow conversions of constants to MAX_INTEGER_COMPUTATION_MODE.  */
-  if (code == NOP_EXPR
-      && TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST)
-    return;
-
-  /* First check the type of the overall operation.   We need only look at
-     unary, binary and relational operations.  */
-  if (TREE_CODE_CLASS (code) == '1'
-      || TREE_CODE_CLASS (code) == '2'
-      || TREE_CODE_CLASS (code) == '<')
-    {
-      mode = TYPE_MODE (TREE_TYPE (exp));
-      if (GET_MODE_CLASS (mode) == MODE_INT
-	  && mode > MAX_INTEGER_COMPUTATION_MODE)
-	internal_error ("unsupported wide integer operation");
-    }
-
-  /* Check operand of a unary op.  */
-  if (TREE_CODE_CLASS (code) == '1')
-    {
-      mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
-      if (GET_MODE_CLASS (mode) == MODE_INT
-	  && mode > MAX_INTEGER_COMPUTATION_MODE)
-	internal_error ("unsupported wide integer operation");
-    }
-
-  /* Check operands of a binary/comparison op.  */
-  if (TREE_CODE_CLASS (code) == '2' || TREE_CODE_CLASS (code) == '<')
-    {
-      mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
-      if (GET_MODE_CLASS (mode) == MODE_INT
-	  && mode > MAX_INTEGER_COMPUTATION_MODE)
-	internal_error ("unsupported wide integer operation");
-
-      mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 1)));
-      if (GET_MODE_CLASS (mode) == MODE_INT
-	  && mode > MAX_INTEGER_COMPUTATION_MODE)
-	internal_error ("unsupported wide integer operation");
-    }
-}
-#endif
 
 /* Return the highest power of two that EXP is known to be a multiple of.
    This is used in updating alignment of MEMs in array references.  */
@@ -6733,49 +6679,6 @@ expand_expr (exp, target, tmode, modifie
 
       target = 0;
     }
-
-#ifdef MAX_INTEGER_COMPUTATION_MODE
-  /* Only check stuff here if the mode we want is different from the mode
-     of the expression; if it's the same, check_max_integer_computation_mode
-     will handle it.  Do we really need to check this stuff at all?  */
-
-  if (target
-      && GET_MODE (target) != mode
-      && TREE_CODE (exp) != INTEGER_CST
-      && TREE_CODE (exp) != PARM_DECL
-      && TREE_CODE (exp) != ARRAY_REF
-      && TREE_CODE (exp) != ARRAY_RANGE_REF
-      && TREE_CODE (exp) != COMPONENT_REF
-      && TREE_CODE (exp) != BIT_FIELD_REF
-      && TREE_CODE (exp) != INDIRECT_REF
-      && TREE_CODE (exp) != CALL_EXPR
-      && TREE_CODE (exp) != VAR_DECL
-      && TREE_CODE (exp) != RTL_EXPR)
-    {
-      enum machine_mode mode = GET_MODE (target);
-
-      if (GET_MODE_CLASS (mode) == MODE_INT
-	  && mode > MAX_INTEGER_COMPUTATION_MODE)
-	internal_error ("unsupported wide integer operation");
-    }
-
-  if (tmode != mode
-      && TREE_CODE (exp) != INTEGER_CST
-      && TREE_CODE (exp) != PARM_DECL
-      && TREE_CODE (exp) != ARRAY_REF
-      && TREE_CODE (exp) != ARRAY_RANGE_REF
-      && TREE_CODE (exp) != COMPONENT_REF
-      && TREE_CODE (exp) != BIT_FIELD_REF
-      && TREE_CODE (exp) != INDIRECT_REF
-      && TREE_CODE (exp) != VAR_DECL
-      && TREE_CODE (exp) != CALL_EXPR
-      && TREE_CODE (exp) != RTL_EXPR
-      && GET_MODE_CLASS (tmode) == MODE_INT
-      && tmode > MAX_INTEGER_COMPUTATION_MODE)
-    internal_error ("unsupported wide integer operation");
-
-  check_max_integer_computation_mode (exp);
-#endif
 
   /* If will do cse, generate all results into pseudo registers
      since 1) that allows cse to find more things
============================================================
Index: gcc/dojump.c
--- gcc/dojump.c	30 Mar 2003 23:07:27 -0000	1.3
+++ gcc/dojump.c	8 Jun 2003 08:26:29 -0000
@@ -134,10 +134,6 @@ do_jump (exp, if_false_label, if_true_la
   tree type;
   enum machine_mode mode;
 
-#ifdef MAX_INTEGER_COMPUTATION_MODE
-  check_max_integer_computation_mode (exp);
-#endif
-
   emit_queue ();
 
   switch (code)
============================================================
Index: gcc/fold-const.c
--- gcc/fold-const.c	6 Jun 2003 12:36:22 -0000	1.255
+++ gcc/fold-const.c	8 Jun 2003 08:26:32 -0000
@@ -4922,10 +4922,6 @@ fold (expr)
   if (kind == 'c')
     return t;
 
-#ifdef MAX_INTEGER_COMPUTATION_MODE
-  check_max_integer_computation_mode (expr);
-#endif
-
   if (code == NOP_EXPR || code == FLOAT_EXPR || code == CONVERT_EXPR)
     {
       tree subop;
============================================================
Index: gcc/doc/tm.texi
--- doc/tm.texi	7 Jun 2003 18:50:54 -0000	1.231
+++ doc/tm.texi	8 Jun 2003 08:26:37 -0000
@@ -9044,15 +9044,6 @@ symbols must be explicitly imported from
 A C statement that adds to @var{clobbers} @code{STRING_CST} trees for
 any hard regs the port wishes to automatically clobber for all asms.
 
-@findex MAX_INTEGER_COMPUTATION_MODE
-@item MAX_INTEGER_COMPUTATION_MODE
-Define this to the largest integer machine mode which can be used for
-operations other than load, store and copy operations.
-
-You need only define this macro if the target holds values larger than
-@code{word_mode} in general purpose registers.  Most targets should not define
-this macro.
-
 @findex MATH_LIBRARY
 @item MATH_LIBRARY
 Define this macro as a C string constant for the linker argument to link

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030608/a9f95068/attachment.sig>


More information about the Gcc-patches mailing list