Commit Graph

203 Commits

Author SHA1 Message Date
Michael Gottesman
c49fb33d29 [region-isolation] Change look through check to use a switch instead of an isa list.
I am doing this because I discovered that mark_dependence was being
misclassified as assigned even though we wanted to treat it as being look
through in its first operand and since I kept on hitting merge conflicts with
the isa list option.

With this commit:

1. I am converting it to a switch in a utility function. That should prevent the
merge conflicts.

2. I also fixed mark_dependence's semantics.

3. I added an assert into CONSTANT_TRANSLATION(..., LookThrough) to make sure
that the switch and the CONSTANT_TRANSLATION code stays in sync.
2024-01-17 14:03:11 -08:00
Michael Gottesman
053e30d46d [region-isolation] Make sure not to run RegionAnalysis on functions that we do not support.
Before this commit, this was done at the beginning of TransferNonSendable. I
thought that those checks would be sufficient to ensure that
RegionAnalysisFunctionInfo was not created for functions that we do not
support. Turns out when we perform certain forms of verification, we force all
function analyses to be created for all functions meaning that we would create a
RegionAnalysisFunctionInfo for such an unsupported function causing us to hit
asserts.

In this commit, I move the check to whether or not we support a function into
RegionAnalysisFunctionInfo itself and use that to determine if we should run
TransferNonSendable. This additionally allows me to change
RegionAnalysisFunctionInfo so that one can construct one for an unsupported
function... as long as one doesn't actually touch any of its methods. If one
does, I put in an assert so we will know that operator error has occured.
2024-01-10 13:41:12 -08:00
Michael Gottesman
a9dc4ed6cc [region-isolation] Refactor out the Region analysis from TransferNonSendable.
NFCI. This is just a pure refactor of the analysis part of TransferNonSendable
into a separate SIL level analysis so it can be reused by other passes.

The reason that I am committing this earlier is that I am working concurrently
on other patches that change TransferNonSendable itself and I want to avoid
issues when rebasing those patches. Getting this patch into tree earlier avoids
that.

This is in preparation for adding a new flow sensitive initialization pass that
combines region based analysis with the current flow sensitive isolation's
diagnostic emitter. The idea is that we want to preserve the diagnostics from
that pass rather than try to make our own as an initial step.
2024-01-10 13:41:12 -08:00