[TIR] Block dependence analysis without schedules #15146
Merged
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.
This work introduces a new object called
BlockDependenceInfo
that computes and returns block dependences. The idea is to be able to expose block level dependences to TIR passes without having to create an explicit schedules.The patch introduces 2 main classes:
SRefTreeCreator
- This creates and returns a new SRefTree and returns a map from original statements to corresponding srefsBlockDependenceInfo
- This object computes the actual dependences between blocks within a block scope and returns it for access in TIR passesThis is a continuation to
PR #15034 and completes the work started there to expose block level dependences to TIR passes
Note: One major difference between the SRef Tree created for dependence analysis here versus the one already present in schedules is that this SRef tree only contains block nodes and not loops. This makes it easier to find the parent blocks (by just accessing
parent
member)