From 785287145e15dab88c193434e6d07b68b4870783 Mon Sep 17 00:00:00 2001 From: Jerry Quinn Date: Wed, 2 Jun 2004 02:09:45 +0000 Subject: [PATCH] Makefile.in (EXPR_H): Add insn-config.h... 2004-06-01 Jerry Quinn * Makefile.in (EXPR_H): Add insn-config.h, function.h, $(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H). (ALIAS_H, EMIT_RTL_H): New. (cselib.o): Replace EXPR_H with EMIT_RTL_H. (cfgcleanup.o): Add EMIT_RTL_H. (alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H. * alias.c: Replace expr.h with emit-rtl.h and alias.h. * attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h. * cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h. * expr.h: Add include guard. Include function.h, rtl.h, flags.h, tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h. (get_varargs_alias_set, get_frame_alias_set, record_base_value, record_alias_subset, new_alias_set, can_address_p): Move to alias.h. (set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset, set_mem_size): Move to emit-rtl.h. * emit-rtl.h: New. * alias.h: New. From-SVN: r82568 --- gcc/ChangeLog | 20 +++++++++++++++ gcc/Makefile.in | 10 +++++--- gcc/alias.c | 3 ++- gcc/alias.h | 31 ++++++++++++++++++++++++ gcc/attribs.c | 1 - gcc/c-lex.c | 1 - gcc/c-objc-common.c | 1 - gcc/c-semantics.c | 1 - gcc/cfgcleanup.c | 2 +- gcc/cselib.c | 2 +- gcc/emit-rtl.h | 48 ++++++++++++++++++++++++++++++++++++ gcc/expr.h | 59 +++++++++++++++++++++++---------------------- 12 files changed, 139 insertions(+), 40 deletions(-) create mode 100644 gcc/alias.h create mode 100644 gcc/emit-rtl.h diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 372c12d9ed0..25e729f1218 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,23 @@ +2004-06-01 Jerry Quinn + + * Makefile.in (EXPR_H): Add insn-config.h, function.h, + $(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H). + (ALIAS_H, EMIT_RTL_H): New. + (cselib.o): Replace EXPR_H with EMIT_RTL_H. + (cfgcleanup.o): Add EMIT_RTL_H. + (alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H. + * alias.c: Replace expr.h with emit-rtl.h and alias.h. + * attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h. + * cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h. + * expr.h: Add include guard. Include function.h, rtl.h, flags.h, + tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h. + (get_varargs_alias_set, get_frame_alias_set, record_base_value, + record_alias_subset, new_alias_set, can_address_p): Move to alias.h. + (set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset, + set_mem_size): Move to emit-rtl.h. + * emit-rtl.h: New. + * alias.h: New. + 2004-06-01 Eric Botcazou * function.c (walk_fixup_memory_subreg): New parameter 'var'. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index ad4a7cd57d6..743f8e8c7f6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -690,7 +690,9 @@ BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \ COVERAGE_H = coverage.h gcov-io.h gcov-iov.h DEMANGLE_H = $(srcdir)/../include/demangle.h RECOG_H = recog.h -EXPR_H = expr.h +ALIAS_H = alias.h +EMIT_RTL_H = emit-rtl.h +EXPR_H = expr.h insn-config.h function.h $(RTL_H) flags.h $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H) OPTABS_H = optabs.h insn-codes.h REGS_H = regs.h varray.h $(MACHMODE_H) INTEGRATE_H = integrate.h varray.h @@ -1833,7 +1835,7 @@ coverage.o : coverage.c gcov-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ toplev.h $(GGC_H) $(TARGET_H) langhooks.h $(COVERAGE_H) libfuncs.h \ gt-coverage.h $(HASHTAB_H) cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ - hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \ + hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EMIT_RTL_H) toplev.h \ output.h function.h cselib.h $(GGC_H) $(TM_P_H) gt-cselib.h $(PARAMS_H) \ alloc-pool.h cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ @@ -1918,7 +1920,7 @@ cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) fla cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TIMEVAR_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h flags.h \ $(RECOG_H) toplev.h $(GGC_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) \ - $(PARAMS_H) $(REGS_H) + $(PARAMS_H) $(REGS_H) $(EMIT_RTL_H) cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \ $(BASIC_BLOCK_H) hard-reg-set.h cfgloop.h flags.h cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ @@ -1993,7 +1995,7 @@ reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) condition hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) except.h \ $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H) alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \ - hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \ + hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(ALIAS_H) $(EMIT_RTL_H) \ $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) \ gt-alias.h $(TIMEVAR_H) cgraph.h regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) insn-config.h \ diff --git a/gcc/alias.c b/gcc/alias.c index 9eed42d3d45..e41e456892a 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -28,7 +28,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tree.h" #include "tm_p.h" #include "function.h" -#include "expr.h" +#include "alias.h" +#include "emit-rtl.h" #include "regs.h" #include "hard-reg-set.h" #include "basic-block.h" diff --git a/gcc/alias.h b/gcc/alias.h new file mode 100644 index 00000000000..371cdabf947 --- /dev/null +++ b/gcc/alias.h @@ -0,0 +1,31 @@ +/* Exported functions from alias.c + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +#ifndef GCC_ALIAS_H +#define GCC_ALIAS_H + +extern HOST_WIDE_INT new_alias_set (void); +extern void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT); +extern HOST_WIDE_INT get_varargs_alias_set (void); +extern HOST_WIDE_INT get_frame_alias_set (void); +extern void record_base_value (unsigned int, rtx, int); +extern int can_address_p (tree); + +#endif /* GCC_ALIAS_H */ diff --git a/gcc/attribs.c b/gcc/attribs.c index 671528ccacd..cbfe6644954 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -29,7 +29,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "rtl.h" #include "ggc.h" -#include "expr.h" #include "tm_p.h" #include "cpplib.h" #include "target.h" diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 3986b2771bb..3a63a053b79 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -27,7 +27,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "real.h" #include "rtl.h" #include "tree.h" -#include "expr.h" #include "input.h" #include "output.h" #include "c-tree.h" diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c index f7e7c8acb10..6b17ad4e690 100644 --- a/gcc/c-objc-common.c +++ b/gcc/c-objc-common.c @@ -26,7 +26,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "rtl.h" #include "insn-config.h" #include "integrate.h" -#include "expr.h" #include "c-tree.h" #include "function.h" #include "flags.h" diff --git a/gcc/c-semantics.c b/gcc/c-semantics.c index 016f0c3300f..ce36fb54304 100644 --- a/gcc/c-semantics.c +++ b/gcc/c-semantics.c @@ -39,7 +39,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "flags.h" #include "ggc.h" #include "rtl.h" -#include "expr.h" #include "output.h" #include "timevar.h" #include "predict.h" diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index af45527afbd..5e23ae977bc 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -50,7 +50,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "target.h" #include "regs.h" #include "cfglayout.h" -#include "expr.h" +#include "emit-rtl.h" /* cleanup_cfg maintains following flags for each basic block. */ diff --git a/gcc/cselib.c b/gcc/cselib.c index 9d738df6e8d..a5f9cfefd72 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -33,7 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "insn-config.h" #include "recog.h" #include "function.h" -#include "expr.h" +#include "emit-rtl.h" #include "toplev.h" #include "output.h" #include "ggc.h" diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h new file mode 100644 index 00000000000..c1735ab5e8a --- /dev/null +++ b/gcc/emit-rtl.h @@ -0,0 +1,48 @@ +/* Exported functions from emit-rtl.c + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +#ifndef GCC_EMIT_RTL_H +#define GCC_EMIT_RTL_H + +/* Set the alias set of MEM to SET. */ +extern void set_mem_alias_set (rtx, HOST_WIDE_INT); + +/* Set the alignment of MEM to ALIGN bits. */ +extern void set_mem_align (rtx, unsigned int); + +/* Set the expr for MEM to EXPR. */ +extern void set_mem_expr (rtx, tree); + +/* Set the offset for MEM to OFFSET. */ +extern void set_mem_offset (rtx, rtx); + +/* Set the size for MEM to SIZE. */ +extern void set_mem_size (rtx, rtx); + +/* Return a memory reference like MEMREF, but with its address changed to + ADDR. The caller is asserting that the actual piece of memory pointed + to is the same, just the form of the address is being changed, such as + by putting something into a register. */ +extern rtx replace_equiv_address (rtx, rtx); + +/* Likewise, but the reference is not required to be valid. */ +extern rtx replace_equiv_address_nv (rtx, rtx); + +#endif /* GCC_EMIT_RTL_H */ diff --git a/gcc/expr.h b/gcc/expr.h index 5c8f9408ba0..763ed12b3f4 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -19,6 +19,21 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef GCC_EXPR_H +#define GCC_EXPR_H + +/* For inhibit_defer_pop */ +#include "function.h" +/* For XEXP, GEN_INT, rtx_code */ +#include "rtl.h" +/* For optimize_size */ +#include "flags.h" +/* For host_integerp, tree_low_cst, convert, size_binop, ssize_int, TREE_CODE, + TYPE_SIZE, int_size_in_bytes, */ +#include "tree.h" +/* For GET_MODE_BITSIZE, word_mode */ +#include "machmode.h" + /* The default branch cost is 1. */ #ifndef BRANCH_COST #define BRANCH_COST 1 @@ -305,6 +320,8 @@ extern void emit_cmp_and_jump_insns (rtx, rtx, enum rtx_code, rtx, /* Generate code to indirectly jump to a location given in the rtx LOC. */ extern void emit_indirect_jump (rtx); +#include "insn-config.h" + #ifdef HAVE_conditional_move /* Emit a conditional move operation. */ rtx emit_conditional_move (rtx, enum rtx_code, rtx, rtx, enum machine_mode, @@ -360,12 +377,6 @@ extern void expand_builtin_setjmp_receiver (rtx); extern void expand_builtin_longjmp (rtx, rtx); extern rtx expand_builtin_saveregs (void); extern void expand_builtin_trap (void); -extern HOST_WIDE_INT get_varargs_alias_set (void); -extern HOST_WIDE_INT get_frame_alias_set (void); -extern void record_base_value (unsigned int, rtx, int); -extern void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT); -extern HOST_WIDE_INT new_alias_set (void); -extern int can_address_p (tree); extern tree simplify_builtin_fputs (tree, int, int, tree); extern tree simplify_builtin_strcpy (tree, tree); extern tree simplify_builtin_strncpy (tree, tree); @@ -563,6 +574,15 @@ extern int try_tablejump (tree, tree, tree, tree, rtx, rtx); XXX Should be a target hook. */ extern unsigned int case_values_threshold (void); +/* Functions from alias.c */ +#include "alias.h" +/* extern HOST_WIDE_INT get_varargs_alias_set (void); */ +/* extern HOST_WIDE_INT get_frame_alias_set (void); */ +/* extern void record_base_value (unsigned int, rtx, int); */ +/* extern void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT); */ +/* extern HOST_WIDE_INT new_alias_set (void); */ +/* extern int can_address_p (tree); */ + /* rtl.h and tree.h were included. */ /* Return an rtx for the size in bytes of the value of an expr. */ @@ -623,21 +643,6 @@ extern rtx memory_address (enum machine_mode, rtx); /* Like `memory_address' but pretent `flag_force_addr' is 0. */ extern rtx memory_address_noforce (enum machine_mode, rtx); -/* Set the alias set of MEM to SET. */ -extern void set_mem_alias_set (rtx, HOST_WIDE_INT); - -/* Set the alignment of MEM to ALIGN bits. */ -extern void set_mem_align (rtx, unsigned int); - -/* Set the expr for MEM to EXPR. */ -extern void set_mem_expr (rtx, tree); - -/* Set the offset for MEM to OFFSET. */ -extern void set_mem_offset (rtx, rtx); - -/* Set the size for MEM to SIZE. */ -extern void set_mem_size (rtx, rtx); - /* Return a memory reference like MEMREF, but with its mode changed to MODE and its address changed to ADDR. (VOIDmode means don't change the mode. @@ -672,14 +677,8 @@ extern rtx adjust_automodify_address_1 (rtx, enum machine_mode, rtx, known to be in OFFSET (possibly 1). */ extern rtx offset_address (rtx, rtx, unsigned HOST_WIDE_INT); -/* Return a memory reference like MEMREF, but with its address changed to - ADDR. The caller is asserting that the actual piece of memory pointed - to is the same, just the form of the address is being changed, such as - by putting something into a register. */ -extern rtx replace_equiv_address (rtx, rtx); - -/* Likewise, but the reference is not required to be valid. */ -extern rtx replace_equiv_address_nv (rtx, rtx); +/* Definitions from emit-rtl.c */ +#include "emit-rtl.h" /* Return a memory reference like MEMREF, but with its mode widened to MODE and adjusted by OFFSET. */ @@ -810,3 +809,5 @@ extern void do_jump_by_parts_greater_rtx (enum machine_mode, int, rtx, rtx, rtx, rtx); extern int vector_mode_valid_p (enum machine_mode); + +#endif /* GCC_EXPR_H */ -- 2.30.2