aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1997-08-11 20:07:24 +0000
committerJeff Law <law@gcc.gnu.org>1997-08-11 14:07:24 -0600
commit9ae8ffe751384e446477c47f8cf670d3a1e92fe9 (patch)
tree070833bf20a821eb8d3cb38069e95b6e7b7b9bc6 /gcc/rtl.h
parent5fa39bfeb7285e06d0cd52c1da94fe93a67703d0 (diff)
downloadgcc-9ae8ffe751384e446477c47f8cf670d3a1e92fe9.zip
gcc-9ae8ffe751384e446477c47f8cf670d3a1e92fe9.tar.gz
gcc-9ae8ffe751384e446477c47f8cf670d3a1e92fe9.tar.bz2
* Integrate alias analysis changes from jfc@mit.edu
* Makefile.in (OBJS): Add alias.o (alias.o): Add dependencies. * alias.c: New file. * sched.c: Remove alias analysis code. It lives in alias.c now. (reg_last_uses_size): Declare. (sched_analyze_2): Add new arguments to true_dependence. (sched_analyze_insn): Use reg_last_uses_size instead of max_reg. (schedule_block): Initialize reg_last_uses_size. (schedule_insns): Always call init_alias_analysis. * calls.c (expand_call): Note calls to malloc, calloc, and realloc; mark return value from such functions as a pointer and keep track of them for alias analysis. If a return value from a function is a pointer, mark it as such. * combine.c (distribute_notes): Handle REG_NOALIAS. * cse.c (struct write_data): Delete. No longer needed. (invalidate): Don't call set_nonvarying_address_components anymore. Use true_dependence to decide if an entry should be removed from the hash table. (invalidate_memory): Remove WRITES argument, simplify appropriately. Fix all callers. (note_mem_written): Similarly for WRITE_PTR argument. (invalidate_from_clobbers): Similarly for W argument. (invalidate_for_call): Remove memory elements from the hash table. (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted. (cse_rtx_varies_p): New function. Derived from old cse_rtx_addr_varies_p. (cse_insn): Remove WRITES_MEMORY and INIT variables and all references. Don't call note_mem_written anymore. Stack pushes invalidate the stack pointer if PUSH_ROUNDING is defined. No longer need to call cse_rtx_addr_varies_p to decide if a MEM should be invalidated. (skipped_writes_memory): Remove variable. (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory. (invalidate_skipped_block): Simplify for new alias analysis code. (cse_set_around_loop): Likewise. (cse_main): Call init_alias_analysis. * flags.h (flag_alias_check, flag_argument_noalias): Declare. * toplev.c (flag_alias_check, flag_argument_noalias): Define. (f_options): Add new alias checking arguments. (main): Set flag_alias_check when optimizing. * local_alloc (validate_equiv_mem_from_store): Add new arguments to true_dependence. (memref_referenced_p): Likewise. * loop.c (NUM_STORES): Increase to 30. (prescan_loop): Only non-constant calls set unknown_address_altered. (invariant_p): Add new arguments to true_dependence. (record_giv): Initialize unrolled and shared fields. (emit_iv_add_mult): Call record_base_value as needed. * loop.h (struct induction): Add unrolled and shared fields. * unroll.c (unroll_loop): Call record_base_value as needed. (copy_loop_body): Likewise. (final_biv_value): Likewise. (final_giv_value): Likewise. (find_splittable_regs): Likewise. Only create one new pseudo if we have multiple address GIVs that were combined with the same dst_reg GIV. Note when a new register is created due to unrolling. * rtl.c (reg_note_name): Add REG_NOALIAS. * rtl.h (enum reg_note): Similarly. (rtx_varies_p, may_trap_p, side_effects_p): Declare. (volatile_refs_p, volatile_insn_p, remove_note): Likewise. (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise. (true_dependence, read_dependence, anti_dependence): Likewise. (output_dependence, init_alias_analysis, end_alias_analysis): Likewise. (mark_user_reg, mark_reg_pointer): Likewise. jfc's alias analysis code. From-SVN: r14768
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index d27b4e5..de9386d 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -317,7 +317,7 @@ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
REG_NONNEG = 8, REG_NO_CONFLICT = 9, REG_UNUSED = 10,
REG_CC_SETTER = 11, REG_CC_USER = 12, REG_LABEL = 13,
REG_DEP_ANTI = 14, REG_DEP_OUTPUT = 15, REG_BR_PROB = 16,
- REG_EXEC_COUNT = 17 };
+ REG_EXEC_COUNT = 17, REG_NOALIAS = 18 };
/* The base value for branch probability notes. */
#define REG_BR_PROB_BASE 10000
@@ -803,6 +803,16 @@ extern rtx gen_ble PROTO((rtx));
extern rtx eliminate_constant_term PROTO((rtx, rtx *));
extern rtx expand_complex_abs PROTO((enum machine_mode, rtx, rtx, int));
extern enum machine_mode choose_hard_reg_mode PROTO((int, int));
+extern int rtx_varies_p PROTO((rtx));
+extern int may_trap_p PROTO((rtx));
+extern int side_effects_p PROTO((rtx));
+extern int volatile_refs_p PROTO((rtx));
+extern int volatile_insn_p PROTO((rtx));
+extern void remove_note PROTO((rtx, rtx));
+extern void note_stores PROTO((rtx, void (*)()));
+extern int refers_to_regno_p PROTO((int, int, rtx, rtx *));
+extern int reg_overlap_mentioned_p PROTO((rtx, rtx));
+
/* Maximum number of parallel sets and clobbers in any insn in this fn.
Always at least 3, since the combiner could put that many togetherm
@@ -959,3 +969,12 @@ extern char *regno_pointer_align;
know what `enum tree_code' means. */
extern int rtx_to_tree_code PROTO((enum rtx_code));
+
+extern int true_dependence PROTO((rtx, enum machine_mode, rtx, int (*)()));
+extern int read_dependence PROTO((rtx, rtx));
+extern int anti_dependence PROTO((rtx, rtx));
+extern int output_dependence PROTO((rtx, rtx));
+extern void init_alias_analysis PROTO((void));
+extern void end_alias_analysis PROTO((void));
+extern void mark_user_reg PROTO((rtx));
+extern void mark_reg_pointer PROTO((rtx, int));