summaryrefslogtreecommitdiffstats
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 16:28:50 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-04 16:28:50 +0000
commit53622482f0ed55e3e41d433c5987524f436223f9 (patch)
tree807a0763c83b8408e6375a2965d0837b8dbb7208 /gcc/cselib.c
parent15eb3fa600de0fa0e30dbf2e03a81fca1d3bd3c1 (diff)
downloadppe42-gcc-53622482f0ed55e3e41d433c5987524f436223f9.tar.gz
ppe42-gcc-53622482f0ed55e3e41d433c5987524f436223f9.zip
* cfgcleanup.c (thread_jump): Update call of cselib_init.
* cselib.c (cselib_record_memory): New static variable. (cselib_lookup_mem, cselib_record_set, cselib_record_sets): Give up on memories when asked for. (cselib_init): Accept new argument. * cselib.h (cselib_init): Update prototype. * gcse.c (local_cprop_pass): Update call of cselib_init. * loop.c (load_mems): Update call of cselib_init. * postreload.c (reload_cse_regs_1): Update call of cselib_init. * sched-deps.c (sched_analyze): Update call of cselib_init. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78917 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 31a6d70a4bb..0dfb1a6c118 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -42,6 +42,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "params.h"
#include "alloc-pool.h"
+static bool cselib_record_memory;
static int entry_and_rtx_equal_p (const void *, const void *);
static hashval_t get_value_hash (const void *);
static struct elt_list *new_elt_list (struct elt_list *, cselib_val *);
@@ -748,6 +749,7 @@ cselib_lookup_mem (rtx x, int create)
struct elt_list *l;
if (MEM_VOLATILE_P (x) || mode == BLKmode
+ || !cselib_record_memory
|| (FLOAT_MODE_P (mode) && flag_float_store))
return 0;
@@ -1201,7 +1203,8 @@ cselib_record_set (rtx dest, cselib_val *src_elt, cselib_val *dest_addr_elt)
n_useless_values--;
src_elt->locs = new_elt_loc_list (src_elt->locs, dest);
}
- else if (GET_CODE (dest) == MEM && dest_addr_elt != 0)
+ else if (GET_CODE (dest) == MEM && dest_addr_elt != 0
+ && cselib_record_memory)
{
if (src_elt->locs == 0)
n_useless_values--;
@@ -1275,7 +1278,8 @@ cselib_record_sets (rtx insn)
sets[i].dest = dest = XEXP (dest, 0);
/* We don't know how to record anything but REG or MEM. */
- if (GET_CODE (dest) == REG || GET_CODE (dest) == MEM)
+ if (GET_CODE (dest) == REG
+ || (GET_CODE (dest) == MEM && cselib_record_memory))
{
rtx src = sets[i].src;
if (cond)
@@ -1320,7 +1324,8 @@ cselib_record_sets (rtx insn)
for (i = 0; i < n_sets; i++)
{
rtx dest = sets[i].dest;
- if (GET_CODE (dest) == REG || GET_CODE (dest) == MEM)
+ if (GET_CODE (dest) == REG
+ || (GET_CODE (dest) == MEM && cselib_record_memory))
cselib_record_set (dest, sets[i].src_elt, sets[i].dest_addr_elt);
}
}
@@ -1398,7 +1403,7 @@ cselib_process_insn (rtx insn)
init_alias_analysis. */
void
-cselib_init (void)
+cselib_init (bool record_memory)
{
elt_list_pool = create_alloc_pool ("elt_list",
sizeof (struct elt_list), 10);
@@ -1408,6 +1413,7 @@ cselib_init (void)
sizeof (cselib_val), 10);
value_pool = create_alloc_pool ("value",
RTX_SIZE (VALUE), 100);
+ cselib_record_memory = record_memory;
/* This is only created once. */
if (! callmem)
callmem = gen_rtx_MEM (BLKmode, const0_rtx);
OpenPOWER on IntegriCloud