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 Tue, 2005-04-19 at 20:45 -0400, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to update a comment about the pass to reflect the
> way PHI-OPT currently operates in.
> 
> I've removed the following sentence
> 
>   bb1 will become unreachable and bb0 and bb2 will almost always be
>   merged into a single block.
> 
> because I don't think this is true at least without copy propagation,
> DCE, and CFG cleanup. 
The statement is true -- the statement does not say when the blocks
will be merged, just that they will be merged (by later optimizations).
The right thing to do would have been to update the comment to reflect
that later optimizations will eventually result in bb0 and bb2 being
merged.




>  Note that the current PHI-OPT does not clean up
> a degenerate PHI node of the form
> 
>   x = PHI <x' (bb0)>;
> 
> that it may create as a result of transformations.
Why not?  That's the whole point of PHI-OPT.  If it's no longer 
performing that optimization, then something as probably gone
wrong.




> 
> Built cc1.  Committed as obvious.
I would rather you not commit this kind of comment change as obvious
since it's far from obvious IMHO.

jeff





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