From d2bb3f9d92b328fbe95195df8e320d6dec1611de Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 29 Mar 2012 13:54:16 +0000 Subject: 2012-03-29 Richard Guenther * cgraph.h (cgraph_materialize_all_clones): Remove. (reset_inline_failed): Likewise. * cgraphunit.c (cgraph_materialize_all_clones): Make static. * cgraphbuild.c (reset_inline_failed): Remove. * rtl.h (cse_main): Remove. (extended_count): Likewise. * cse.c (dump_class): Mark as DEBUG_FUNCTION. (cse_main): Make static. * combine.c (extended_count): Remove. (dump_combine_stats): Mark as DEBUG_FUNCTION. * basic-block.h (reorder_basic_blocks): Remove. * bb-reorder.c (reorder_basic_blocks): Make static. * Makefile.in (dse.o): Remove dse.h dependency. * dse.h: Remove. * dse.c (gate_dse): Remove. (clear_alias_mode_eq): Likewise. (clear_alias_mode_hash): Likewise. (dse_record_singleton_alias_set): Likewise. (dse_invalidate_singleton_alias_set): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185962 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dse.c | 109 -------------------------------------------------------------- 1 file changed, 109 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index a9fe9249369..d6c8de7fad8 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -44,7 +44,6 @@ along with GCC; see the file COPYING3. If not see #include "insn-config.h" #include "expr.h" #include "recog.h" -#include "dse.h" #include "optabs.h" #include "dbgcnt.h" #include "target.h" @@ -614,7 +613,6 @@ static bitmap kill_on_calls; static unsigned int current_position; -static bool gate_dse (void); static bool gate_dse1 (void); static bool gate_dse2 (void); @@ -625,28 +623,6 @@ static bool gate_dse2 (void); Initialization. ----------------------------------------------------------------------------*/ -/* Hashtable callbacks for maintaining the "bases" field of - store_group_info, given that the addresses are function invariants. */ - -static int -clear_alias_mode_eq (const void *p1, const void *p2) -{ - const struct clear_alias_mode_holder * h1 - = (const struct clear_alias_mode_holder *) p1; - const struct clear_alias_mode_holder * h2 - = (const struct clear_alias_mode_holder *) p2; - return h1->alias_set == h2->alias_set; -} - - -static hashval_t -clear_alias_mode_hash (const void *p) -{ - const struct clear_alias_mode_holder *holder - = (const struct clear_alias_mode_holder *) p; - return holder->alias_set; -} - /* Find the entry associated with ALIAS_SET. */ @@ -3044,85 +3020,6 @@ dse_step2_spill (void) ----------------------------------------------------------------------------*/ -/* Note that this is NOT a general purpose function. Any mem that has - an alias set registered here expected to be COMPLETELY unaliased: - i.e it's addresses are not and need not be examined. - - It is known that all references to this address will have this - alias set and there are NO other references to this address in the - function. - - Currently the only place that is known to be clean enough to use - this interface is the code that assigns the spill locations. - - All of the mems that have alias_sets registered are subjected to a - very powerful form of dse where function calls, volatile reads and - writes, and reads from random location are not taken into account. - - It is also assumed that these locations go dead when the function - returns. This assumption could be relaxed if there were found to - be places that this assumption was not correct. - - The MODE is passed in and saved. The mode of each load or store to - a mem with ALIAS_SET is checked against MEM. If the size of that - load or store is different from MODE, processing is halted on this - alias set. For the vast majority of aliases sets, all of the loads - and stores will use the same mode. But vectors are treated - differently: the alias set is established for the entire vector, - but reload will insert loads and stores for individual elements and - we do not necessarily have the information to track those separate - elements. So when we see a mode mismatch, we just bail. */ - - -void -dse_record_singleton_alias_set (alias_set_type alias_set, - enum machine_mode mode) -{ - struct clear_alias_mode_holder tmp_holder; - struct clear_alias_mode_holder *entry; - void **slot; - - /* If we are not going to run dse, we need to return now or there - will be problems with allocating the bitmaps. */ - if ((!gate_dse()) || !alias_set) - return; - - if (!clear_alias_sets) - { - clear_alias_sets = BITMAP_ALLOC (NULL); - disqualified_clear_alias_sets = BITMAP_ALLOC (NULL); - clear_alias_mode_table = htab_create (11, clear_alias_mode_hash, - clear_alias_mode_eq, NULL); - clear_alias_mode_pool = create_alloc_pool ("clear_alias_mode_pool", - sizeof (struct clear_alias_mode_holder), 100); - } - - bitmap_set_bit (clear_alias_sets, alias_set); - - tmp_holder.alias_set = alias_set; - - slot = htab_find_slot (clear_alias_mode_table, &tmp_holder, INSERT); - gcc_assert (*slot == NULL); - - *slot = entry = - (struct clear_alias_mode_holder *) pool_alloc (clear_alias_mode_pool); - entry->alias_set = alias_set; - entry->mode = mode; -} - - -/* Remove ALIAS_SET from the sets of stack slots being considered. */ - -void -dse_invalidate_singleton_alias_set (alias_set_type alias_set) -{ - if ((!gate_dse()) || !alias_set) - return; - - bitmap_clear_bit (clear_alias_sets, alias_set); -} - - /* Look up the bitmap index for OFFSET in GROUP_INFO. If it is not there, return 0. */ @@ -4014,12 +3911,6 @@ rest_of_handle_dse (void) return 0; } -static bool -gate_dse (void) -{ - return gate_dse1 () || gate_dse2 (); -} - static bool gate_dse1 (void) { -- cgit v1.2.1