https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104475

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org

--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #7)
> I think we shouldn't do anything on the optimization side - sure, the path
> isolation in the end turns out not profitable, but it's likely hard to decide
> that.
> 
> Maybe we can somehow avoid threading for a ptr == 0 condition?  Why do we
> make
> the threading profitable?

The threaders are mostly blind wrt threading a path.  If they see it, they will
thread it.  There are some minor things we disallow (see calls to cancel_thread
throughout) and the big hammer we introduced in this release with
cancel_invalid_paths() where we disallow problematic loop transformations.  But
mostly we thread everything that's possible.

Disallowing ptr == 0 as well as highly unlikely paths should be trivial.  We
could add a simple check in cancel_invalid_paths(). Though, I assume that would
affect warning code all over, since we're reducing the amount of threadable
paths on which they depend?

Reply via email to