I’ve recently run into a couple optimization opportunities in TIR and I realized that some of them might be useful as TIR transformation passes.
I also realized that these transforms are easier to implement and reason about if I do it at the level of
BlockNodes because of the existence of clear dependence analysis, but I realized (while trying to implement them) that all the dependence info is based on
SRef trees which are not available without a
BlockScope. Thus, they cannot be directly used in implementation of a transforms pass for TIR (as we don’t really create a schedule when applying transformation passes).
So I wanted to ask a high-level question on what is the reason behind having the dependence info attached to Schedules, and whether it would make sense to extract it out to a different class (perhaps as an analysis pass) that can be used in other passes.
P.S. I could split my optimization as an analysis pass and a schedule primitive that acts on that, but I think it might be better to implement them as a transforms pass as they really don’t need any inputs from user.
Thanks in advance,