This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tree-ssa-phiopt.c: Update a comment about the pass


On Wed, Apr 20, 2005 at 12:33:46PM -0600, Jeffrey A Law wrote:

> And it appears that we do not have cprop & DCE scheduled immediately
> after phi-opt, which means this stuff is lying around a long longer
> than is necessary (and a lot longer than it used to be since we used
> to have redundant phi removal scheduled soon after phi-opt).
> 
Well, yes.  Is this causing significant hardship or slow downs?
No scheduling will be ideal for all inputs.

> I'll note this would be another excellent case where having an API
> into the cprop code which allowed a pass which uncovers const/copy
> propagation opportunity to propagate the values to their uses would
> be helpful and probably significantly lower overhead than having
> to schedule cprop & dce passes.
> 
Is it really *that* important to remove these redundancies
immediately instead of scheduling cleanups every few passes in
the pipeline? (numbers, please).

It's OK if passes are leaving so much crud around that it becomes
a problem.  But if this is only a few dangling instructions here
and there that get cleaned up in the next sweep, then maybe it's
not as important.  I'd like to get an idea of how big a problem
this is.

In terms of the API, how's this?  The caller discovers that NAME
has value VAL and calls:

void replace_uses_of_with (tree name, tree val);

	1- Replace all immediate uses of NAME with VAL.

	2- Remove the defining statement for NAME.

	3- Fold as necessary and schedule a CFG cleanup.

That would be trivial to implement.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]