mbox

[0/2] tree-optimization/104530 - proposed re-evaluation.

Message ID a38f4b49-dd7b-320f-444a-e677f76281fe@redhat.com
Headers

Message

Andrew MacLeod Feb. 22, 2022, 4:39 p.m. UTC
  I'd like to get clarification on some subtle terminology. I find I am 
conflating calls that don't return with calls that may throw, and I 
think they have different considerations.

My experiments with calls that can throw indicate that they always end a 
basic block.  This makes sense to me as there is the outgoing fall-thru 
edge and an outgoing EH edge.  Are there any conditions under which this 
is not the case? (other than non-call exceptions)

If that supposition is true, that leaves us with calls in the middle of 
the block which may not return.  This prevents us from allowing later 
calculations from impacting anything which happens before the call.

I believe the following 2 small patches could then resolve this.
  1 - Export global names to SSA_NAME_RANGE_INFO during the statement 
walk instead of at the end of the pass
  2 - Use the existing lazy recomputation machinery to recompute any 
globals which are defined in the block where a dependent value becomes 
non-null.

More details in each patch.  Neither is very large.  We could add this 
to this release or wait for stage 1.

Andrew