diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-31 18:37:31 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-31 18:37:31 +0000 |
commit | f7c44134031628fa9dd82ae7920772ea4efbe3f4 (patch) | |
tree | b0b7fe92ad1922c85f0e4c70693ee5b33b128261 /gcc/expr.h | |
parent | 1101b60ee4e306784bdd2c3ecba9a4460078c1d8 (diff) | |
download | gcc-f7c44134031628fa9dd82ae7920772ea4efbe3f4.tar.gz |
* Makefile.in (c-decl.o): Depend on rtl.h and expr.h.
* alias.c (struct alias_entry): alias_set is HOST_WIDE_INT.
(REG_BASE_VALUE): Remove unneeded cast to unsigned.
(get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT.
(find_base_decl): New function, from c_find_base_decl in c-common.c.
(new_alias_set): Moved from tree.c; return is HOST_WIDE_INT.
(get_alias_set): Likewise.
Major rework to do more things and allow language-specific code
to just handle special-cases.
(record_alias_subset): Args are HOST_WIDE_INT.
(record_component_alias): Local vars are HOST_WIDE_INT.
Don't handle COMPLEX_EXPR.
(get_varargs_alias_set): Moved from builtins.c.
(get_frame_alias_set): New function.
* builtins.c (expand_builtin_return_address): Use frame alias set.
(expand_builtin_setjmp, expand_builtin_longjmp): Use alias set
for setjmp buffer.
(get_memory_rtx): Rework to use set_mem_attributes.
(get_varargs_alias_set): Deleted from here.
* c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT.
(c_find_base_decl): Deleted from here.
(c_get_alias_set): Remove many cases and rework to just handle
C-specific cases.
* c-common.h (c_get_alias_set): Returns HOST_WIDE_INT.
* c-decl.c (rtl.h, expr.h): Now included.
(init_decl_processing): Call record_component_aliases on array types.
(grokdeclarator): Likewise.
Set TREE_ADDRESSABLE for all fields that are not bitfields.
* c-typeck.c (common_type): Call record_component_aliases for array.
* caller-save.c (setup_save_areas): Rework register loop for unsigned.
Set all save areas to the frame alias set.
* calls.c (initialie_argument_information): Call set_mem_attributes.
(compute_argument_addresses, expand_call): Likewise.
* explow.c (set_mem_attributes): New function.
(stabilize): Use MEM_COPY_ATTRIBUTES and force_reg.
* expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}.
LEN and OFFSET now HOST_WIDE_INT.
(clear_by_pieces): Similar changes.
(move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields.
(move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT.
(move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES.
(clear_by_pieces_1): Likewise.
(emit_push_insn): Call set_mem_attributes.
(expand_expr, case INDIRECT_REF): Likewise.
(expand_expr, case VAR_DECL): Call change_address.
* expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and
tree_low_cst.
(get_varargs_alias_set, get_frame_alias_set): New decls.
(record_base_value, record_alias_subset, lang_get_alias_set): Likewise.
(new_alias_set, set_mem_attributes): Likewse.
* function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT.
(assign_stack_temp_for_type): Likewise.
Can split slot even if alias set since can copy.
Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P.
(assign_temp): Use host_integerp and tree_low_cst.
(put_var_into_stack): Properly handle SAVE_EXPR.
(put_addressof_into_stack): Likewise.
(assign_parms): Call set_mem_attributes.
Delete #if 0 code.
(fix_lexical_address): Put reference to chain into frame alias set.
(expand_function_start): Call set_mem_attributes.
* integrate.c (expand_inline_function): Likewise.
* recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES.
* regmove.c (try_apply_stack_adjustment): Likewise.
* reload.c (push_reload, make_memloc): Likewise.
* reload1.c (alter_reg): Make alias sets for spilled pseudos.
* rtl.def (MEM): Update comment.
* rtl.h (MEM_ALIAS_SET): Now uses XCWINT.
(move_by_pieces): Change length to HOST_WIDE_INT.
(record_base_value, record_alias_subset): Delete from here.
* stmt.c (expand_decl): Call set_mem_attributes.
* stor-layout.c (finish_record_layout): Call record_component_aliases.i
* toplev.c (compile_file): Call init_alias_once earlier.
* tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted
from here: now in alias.c.
* tree.h (struct tree_type): alias_set is HOST_WIDE_INT.
(struct tree_decl): Likewise.
(get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here.
* varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes.
(output_constant_def, force_const_mem): Likewise.
* cp/Makefile.in (decl.o): Include ../expr.h.
* cp/decl.c (expr.h): Include.
(init_decl_processing): Call record_component_aliases for arrays.
(grokdeclarator): Likewise.
Set TREE_ADDRESSABLE for fields that aren't bitfields.
* cp/tree.c (build_cplus_array_type_1): Call record_component_aliases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/gcc/expr.h b/gcc/expr.h index 8d7a9d8152c..ca82ab1fe49 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -94,8 +94,8 @@ struct args_size #define ADD_PARM_SIZE(TO, INC) \ { tree inc = (INC); \ - if (TREE_CODE (inc) == INTEGER_CST) \ - (TO).constant += TREE_INT_CST_LOW (inc); \ + if (host_integerp (inc, 0)) \ + (TO).constant += tree_low_cst (inc, 0); \ else if ((TO).var == 0) \ (TO).var = inc; \ else \ @@ -103,8 +103,8 @@ struct args_size #define SUB_PARM_SIZE(TO, DEC) \ { tree dec = (DEC); \ - if (TREE_CODE (dec) == INTEGER_CST) \ - (TO).constant -= TREE_INT_CST_LOW (dec); \ + if (host_integerp (dec, 0)) \ + (TO).constant -= tree_low_cst (dec, 0); \ else if ((TO).var == 0) \ (TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \ else \ @@ -915,7 +915,16 @@ extern rtx expand_builtin_va_arg PARAMS ((tree, tree)); extern rtx expand_builtin_setjmp PARAMS ((rtx, rtx, rtx, rtx)); extern void expand_builtin_longjmp PARAMS ((rtx, rtx)); extern rtx expand_builtin_saveregs PARAMS ((void)); -extern int get_varargs_alias_set PARAMS ((void)); +extern HOST_WIDE_INT get_varargs_alias_set PARAMS ((void)); +extern HOST_WIDE_INT get_frame_alias_set PARAMS ((void)); +extern void record_base_value PARAMS ((unsigned int, rtx, int)); +extern void record_alias_subset PARAMS ((HOST_WIDE_INT, + HOST_WIDE_INT)); +#ifdef TREE_CODE +extern HOST_WIDE_INT get_alias_set PARAMS ((tree)); +extern HOST_WIDE_INT (*lang_get_alias_set) PARAMS ((tree)); +#endif +extern HOST_WIDE_INT new_alias_set PARAMS ((void)); /* Functions from expr.c: */ @@ -1013,10 +1022,9 @@ extern void emit_push_insn PARAMS ((rtx, enum machine_mode, tree, rtx, int, rtx)); /* Emit library call. */ -extern void emit_library_call PARAMS ((rtx orgfun, int no_queue, - enum machine_mode outmode, int nargs, ...)); -extern rtx emit_library_call_value PARAMS ((rtx orgfun, rtx value, int no_queue, - enum machine_mode outmode, int nargs, ...)); +extern void emit_library_call PARAMS ((rtx, int, enum machine_mode, int, ...)); +extern rtx emit_library_call_value PARAMS ((rtx, rtx, int, enum machine_mode, + int, ...)); /* Expand an assignment that stores the value of FROM into TO. */ extern rtx expand_assignment PARAMS ((tree, tree, int, int)); @@ -1100,10 +1108,17 @@ extern rtx prepare_call_address PARAMS ((rtx, tree, rtx *, int)); extern rtx expand_call PARAMS ((tree, rtx, int)); -extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree, rtx, int)); -extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx, rtx, rtx, int)); -extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree, struct args_size *, struct args_size *, struct args_size *, struct args_size *)); +extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree, + rtx, int)); +extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx, + rtx, rtx, int)); +extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree, + struct args_size *, + struct args_size *, + struct args_size *, + struct args_size *)); extern rtx expand_inline_function PARAMS ((tree, tree, rtx, int, tree, rtx)); + /* Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. */ extern rtx label_rtx PARAMS ((tree)); #endif @@ -1132,9 +1147,15 @@ extern rtx change_address PARAMS ((rtx, enum machine_mode, rtx)); /* Return a memory reference like MEMREF, but which is known to have a valid address. */ - extern rtx validize_mem PARAMS ((rtx)); +#ifdef TREE_CODE +/* Given REF, a MEM, and T, either the type of X or the expression + corresponding to REF, set the memory attributes. OBJECTP is nonzero + if we are making a new object of this type. */ +extern void set_mem_attributes PARAMS ((rtx, tree, int)); +#endif + /* Assemble the static constant template for function entry trampolines. */ extern rtx assemble_trampoline_template PARAMS ((void)); |