comparison gcc/cselib.h @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* Common subexpression elimination for GNU compiler. 1 /* Common subexpression elimination for GNU compiler.
2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
3 1999, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 3 1998, 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
4 5
5 This file is part of GCC. 6 This file is part of GCC.
6 7
7 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free 9 the terms of the GNU General Public License as published by the Free
19 <http://www.gnu.org/licenses/>. */ 20 <http://www.gnu.org/licenses/>. */
20 21
21 /* Describe a value. */ 22 /* Describe a value. */
22 typedef struct GTY(()) cselib_val_struct { 23 typedef struct GTY(()) cselib_val_struct {
23 /* The hash value. */ 24 /* The hash value. */
24 unsigned int value; 25 unsigned int hash;
26
27 /* A unique id assigned to values. */
28 int uid;
25 29
26 /* A VALUE rtx that points back to this structure. */ 30 /* A VALUE rtx that points back to this structure. */
27 rtx val_rtx; 31 rtx val_rtx;
28 32
29 /* All rtl expressions that hold this value at the current time during a 33 /* All rtl expressions that hold this value at the current time during a
60 rtx dest; 64 rtx dest;
61 cselib_val *src_elt; 65 cselib_val *src_elt;
62 cselib_val *dest_addr_elt; 66 cselib_val *dest_addr_elt;
63 }; 67 };
64 68
69 enum cselib_record_what
70 {
71 CSELIB_RECORD_MEMORY = 1,
72 CSELIB_PRESERVE_CONSTANTS = 2
73 };
74
65 extern void (*cselib_discard_hook) (cselib_val *); 75 extern void (*cselib_discard_hook) (cselib_val *);
66 extern void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets, 76 extern void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets,
67 int n_sets); 77 int n_sets);
68 78
69 extern cselib_val *cselib_lookup (rtx, enum machine_mode, int); 79 extern cselib_val *cselib_lookup (rtx, enum machine_mode, int);
70 extern void cselib_init (bool record_memory); 80 extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode, int, rtx);
81 extern void cselib_init (int);
71 extern void cselib_clear_table (void); 82 extern void cselib_clear_table (void);
72 extern void cselib_finish (void); 83 extern void cselib_finish (void);
73 extern void cselib_process_insn (rtx); 84 extern void cselib_process_insn (rtx);
74 extern enum machine_mode cselib_reg_set_mode (const_rtx); 85 extern enum machine_mode cselib_reg_set_mode (const_rtx);
75 extern int rtx_equal_for_cselib_p (rtx, rtx); 86 extern int rtx_equal_for_cselib_p (rtx, rtx);
76 extern int references_value_p (const_rtx, int); 87 extern int references_value_p (const_rtx, int);
77 extern rtx cselib_expand_value_rtx (rtx, bitmap, int); 88 extern rtx cselib_expand_value_rtx (rtx, bitmap, int);
78 typedef rtx (*cselib_expand_callback)(rtx, bitmap, int, void *); 89 typedef rtx (*cselib_expand_callback)(rtx, bitmap, int, void *);
79 extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int, 90 extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int,
80 cselib_expand_callback, void*); 91 cselib_expand_callback, void *);
92 extern bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int,
93 cselib_expand_callback, void *);
81 extern rtx cselib_subst_to_values (rtx); 94 extern rtx cselib_subst_to_values (rtx);
82 extern void cselib_invalidate_rtx (rtx); 95 extern void cselib_invalidate_rtx (rtx);
83 96
84 extern void cselib_reset_table_with_next_value (unsigned int); 97 extern void cselib_reset_table (unsigned int);
85 extern unsigned int cselib_get_next_unknown_value (void); 98 extern unsigned int cselib_get_next_uid (void);
86 extern void cselib_preserve_value (cselib_val *); 99 extern void cselib_preserve_value (cselib_val *);
87 extern bool cselib_preserved_value_p (cselib_val *); 100 extern bool cselib_preserved_value_p (cselib_val *);
88 extern void cselib_preserve_only_values (bool); 101 extern void cselib_preserve_only_values (void);
102 extern void cselib_preserve_cfa_base_value (cselib_val *);
89 103
90 extern void dump_cselib_table (FILE *); 104 extern void dump_cselib_table (FILE *);