On Fri, Oct 30, 2015 at 1:21 PM, Richard Sandiford
<richard.sandif...@arm.com> wrote:
> Richard Biener <richard.guent...@gmail.com> writes:
>> On Fri, Oct 30, 2015 at 12:18 PM, Richard Sandiford
>> <richard.sandif...@arm.com> wrote:
>>> It's fairly easy to update the virtual ops when the call has no EH edges,
>>> which should be cheaper than mark_virtual_operands_for_renaming.
>>>
>>> Tested on x86_64-linux-gnu, arm-linux-gnueabi and aarch64-linux-gnu.
>>> OK to install?
>>
>> Well.  I think this can be easily improved to handle the EH edge case
>> by not replacing the virtual uses in the EH region.
>
> OK.  I suppose I was just going for the low-hanging fruit. :-)

Heh, true.  It's never that simple.

> I'll drop this in favour of getting the internal function stuff finished for 
> stage 1.

Fair enough (and yes, I definitely like to see at least internal
function support
for genmatch/match.pd for GCC 6).

>> Btw, did you verify the pass does things correctly when facing an EH
>> throwing situation?  It seems all math builtins are marked as NOTHROW
>> regardless of -fnon-call-exceptions ...
>
> The main test case for that seems to be g++.dg/opt/pr58165.C.  I'd tried
> other variations of that locally.

Looking at this example I realize it would be nice to be in "(virtual) EH-closed
SSA form" so that all uses on an EH edge are reachable by walking the
EH edge destination PHI nodes ...

Otherwise of couse the fix is to propagate only into uses which are
not dominated
by the EH dest.  A replace_uses_by variant which takes an edge to check ignored
uses would come handy here.

Richard.

> Thanks,
> Richard
>

Reply via email to