SelectVariableNames: Make a Wrapper for DataflowAnalysis #1820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NoiseAnalysis (and also other analysis) may want to get unique name of a
Value, e.g. for symbolic way of analysis (see #1817)I do not know if this way of providing name for analysis is favorable (so requesting opinions from @j2kun before more technical details). I used to have another
NameAnalysisso that NoiseAnalysis could accessNameLattice, turned out that is a duplicate ofSelectVariableNamesso I modified this analysis to have a dataflow framework wrapper.Notice that other ways of solving it include
SelectVariableNamestruct to every analysis, which is inconvenient if we get more analysis. Passing it to the DataFlowSolver might be more convenient.LocalParam, which is essentially constructed from the IR, which requires annotating the IR with HEIR generated name (quite strange)Other problem involves loop-carried variable which has the same name but does not have the same analysis state, which we (and also MLIR) are quite unable to handle. One way is to force the invariant for these variables via bootstrapping, but then we need to think about what "reset the Symbolic State" means for bootstrapping inside a loop.