This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] C++-ify and move control dependence code
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 05 Sep 2013 09:23:33 -0600
- Subject: Re: [PATCH] C++-ify and move control dependence code
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1309051604290 dot 3869 at zhemvz dot fhfr dot qr>
On 09/05/2013 08:05 AM, Richard Biener wrote:
I like it. I'd actually moved the control dependence stuff out of DCE
in the past as well, but never pushed it upstream. I actually put it
into its own files which were trivially small.
This C++-ifies and moves the control dependence code from tree-ssa-dce.c
to cfganal.c as I am about to re-use that code from loop distribution.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
2013-09-05 Richard Biener <email@example.com>
* basic-block.h (class control_dependences): New.
* tree-ssa-dce.c (control_dependence_map): Remove.
(cd): New global.
find_pdom, find_control_dependence, find_all_control_dependences):
Move to cfganal.c.
propagate_necessity, tree_dce_init, tree_dce_done,
* cfganal.c (set_control_dependence_map_bit,
clear_control_dependence_bitmap, find_pdom, find_control_dependence,
find_all_control_dependences): Move from tree-ssa-dce.c and
implement as methods of control_dependences class.
This was done in the context of implementing Click's GCM algorithm -- in
the end the GCM bits didn't do significantly better than the existing
sinking code at moving stuff onto more control dependent paths (after
fixing minor oversights in our existing code).