* Re: GCSE cleanups
2001-11-13 15:03 ` Richard Henderson
@ 2001-11-13 15:03 ` Gerald Pfeifer
0 siblings, 0 replies; 3+ messages in thread
From: Gerald Pfeifer @ 2001-11-13 15:03 UTC (permalink / raw)
To: Jan Hubicka, Richard Henderson; +Cc: gcc-patches, gcc-pdo
On Mon, 19 Nov 2001, Richard Henderson wrote:
> On Mon, Nov 19, 2001 at 01:06:38PM +0100, Jan Hubicka wrote:
>> * gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
^^^^^^^^
Typo?
Gerald
--
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GCSE cleanups
2001-11-13 15:03 GCSE cleanups Jan Hubicka
@ 2001-11-13 15:03 ` Richard Henderson
2001-11-13 15:03 ` Gerald Pfeifer
0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2001-11-13 15:03 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches, gcc-pdo
On Mon, Nov 19, 2001 at 01:06:38PM +0100, Jan Hubicka wrote:
> * gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
> call purge_dead_edges after removing.
> (delete_null_pointer_checks): Do not handle delete_list.
Ok.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* GCSE cleanups
@ 2001-11-13 15:03 Jan Hubicka
2001-11-13 15:03 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Jan Hubicka @ 2001-11-13 15:03 UTC (permalink / raw)
To: gcc-patches, gcc-pdo, rth
Hi,
attached patch cleans up gcse now when it is easy to keep CFG consistent after
removing edges. The delete_list code can now be easilly removed making code
cleaner.
I've installed that for cfg branch, bootstrapped/regtested mainline, OK for
mainline?
Honza
Mon Nov 19 13:04:23 CET 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
call purge_dead_edges after removing.
(delete_null_pointer_checks): Do not handle delete_list.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.164.2.3
diff -c -3 -p -r1.164.2.3 gcse.c
*** gcse.c 2001/11/19 11:08:04 1.164.2.3
--- gcse.c 2001/11/19 11:57:25
*************** static int handle_avail_expr PARAMS ((rt
*** 656,662 ****
static int classic_gcse PARAMS ((void));
static int one_classic_gcse_pass PARAMS ((int));
static void invalidate_nonnull_info PARAMS ((rtx, rtx, void *));
! static void delete_null_pointer_checks_1 PARAMS ((varray_type *, unsigned int *,
sbitmap *, sbitmap *,
struct null_pointer_info *));
static rtx process_insert_insn PARAMS ((struct expr *));
--- 656,662 ----
static int classic_gcse PARAMS ((void));
static int one_classic_gcse_pass PARAMS ((int));
static void invalidate_nonnull_info PARAMS ((rtx, rtx, void *));
! static void delete_null_pointer_checks_1 PARAMS ((unsigned int *,
sbitmap *, sbitmap *,
struct null_pointer_info *));
static rtx process_insert_insn PARAMS ((struct expr *));
*************** invalidate_nonnull_info (x, setter, data
*** 5193,5201 ****
they are not our responsibility to free. */
static void
! delete_null_pointer_checks_1 (delete_list, block_reg, nonnull_avin,
nonnull_avout, npi)
- varray_type *delete_list;
unsigned int *block_reg;
sbitmap *nonnull_avin;
sbitmap *nonnull_avout;
--- 5193,5200 ----
they are not our responsibility to free. */
static void
! delete_null_pointer_checks_1 (block_reg, nonnull_avin,
nonnull_avout, npi)
unsigned int *block_reg;
sbitmap *nonnull_avin;
sbitmap *nonnull_avout;
*************** delete_null_pointer_checks_1 (delete_lis
*** 5324,5337 ****
JUMP_LABEL (new_jump) = JUMP_LABEL (last_insn);
LABEL_NUSES (JUMP_LABEL (new_jump))++;
emit_barrier_after (new_jump);
- delete_insn (last_insn);
}
- if (!*delete_list)
- VARRAY_RTX_INIT (*delete_list, 10, "delete_list");
! VARRAY_PUSH_RTX (*delete_list, last_insn);
if (compare_and_branch == 2)
! VARRAY_PUSH_RTX (*delete_list, earliest);
/* Don't check this block again. (Note that BLOCK_END is
invalid here; we deleted the last instruction in the
--- 5323,5334 ----
JUMP_LABEL (new_jump) = JUMP_LABEL (last_insn);
LABEL_NUSES (JUMP_LABEL (new_jump))++;
emit_barrier_after (new_jump);
}
! delete_insn (last_insn);
if (compare_and_branch == 2)
! delete_insn (earliest);
! purge_dead_edges (BASIC_BLOCK (bb));
/* Don't check this block again. (Note that BLOCK_END is
invalid here; we deleted the last instruction in the
*************** delete_null_pointer_checks (f)
*** 5370,5381 ****
{
sbitmap *nonnull_avin, *nonnull_avout;
unsigned int *block_reg;
- varray_type delete_list = NULL;
int bb;
int reg;
int regs_per_pass;
int max_reg;
- unsigned int i;
struct null_pointer_info npi;
/* If we have only a single block, then there's nothing to do. */
--- 5367,5376 ----
*************** delete_null_pointer_checks (f)
*** 5444,5459 ****
{
npi.min_reg = reg;
npi.max_reg = MIN (reg + regs_per_pass, max_reg);
! delete_null_pointer_checks_1 (&delete_list, block_reg, nonnull_avin,
nonnull_avout, &npi);
- }
-
- /* Now delete the instructions all at once. This breaks the CFG. */
- if (delete_list)
- {
- for (i = 0; i < VARRAY_ACTIVE_SIZE (delete_list); i++)
- delete_insn (VARRAY_RTX (delete_list, i));
- VARRAY_FREE (delete_list);
}
/* Free the table of registers compared at the end of every block. */
--- 5439,5446 ----
{
npi.min_reg = reg;
npi.max_reg = MIN (reg + regs_per_pass, max_reg);
! delete_null_pointer_checks_1 (block_reg, nonnull_avin,
nonnull_avout, &npi);
}
/* Free the table of registers compared at the end of every block. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-11-20 7:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 GCSE cleanups Jan Hubicka
2001-11-13 15:03 ` Richard Henderson
2001-11-13 15:03 ` Gerald Pfeifer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).