<html><body><p><font size="2">Forwarding to the dev list, in case others ran into similar issues and/or have input on this topic.</font><br><br><font size="2">Bardia Mahjour<br></font><br><font size="2" color="#800080">----- Forwarded by Bardia Mahjour/Toronto/IBM</font><font size="2" color="#800080"> on 2020/03/30 02:25 PM</font><font size="2" color="#800080"> -----</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Bardia Mahjour/Toronto/IBM</font><br><font size="2" color="#5F5F5F">To: </font><font size="2">listmail@philipreames.com</font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">"Michael Kruse" <llvm@meinersbur.de></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">2020/03/26 11:47 AM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">Scalar Evolution Expressions Involving Sibling Loops</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><font size="2">Hi Philip,</font><br><br><font size="2">I hope you are doing well. </font><br><br><font size="2">We've recently run into an issue with SCEV in the context of dependence analysis, and would like your opinion on it. Background discussion can be found here </font><a href="https://reviews.llvm.org/D75628#inline-689527"><font size="2">https://reviews.llvm.org/D75628#inline-689527</font></a><font size="2">.</font><br><br><font size="2">Basically in this case, the dependence equation requires us to symbolically create an expression involving two or more recurrences that recur with non-dominating loops (sibling loops). Currently creating such a SCEV expression trips asserts in `</font><tt><font size="2">CompareSCEVComplexity</font></tt><font size="2">()` and `</font><tt><font size="2">isKnownViaInduction</font></tt><font size="2">()` saying that a given SCEV expression cannot be composed of recurrences that have no dominance relationship between them. </font><br><br><font size="2">Michael tried explaining to me why there is this restriction about dominance, and I'm beginning to understand why such restriction may be necessary when evaluating or expanding SCEV expressions in outer scopes (eg. `</font><tt>getSCEVAtScope</tt><font size="2">(nullptr)`) but I still don't understand why this restriction is imposed at construction. Shouldn't this restriction be asserted on when calling getSCEVAtScope instead of when creating AddRecs, given that simplification steps may remove identical terms involving non-dominating loops? </font><br><br><font size="2">We would appreciate any other insight you might have about this issue.</font><br><br><font size="2">Regards,</font><br><br><font size="2">Bardia Mahjour<br>Compiler Optimizations<br>IBM Toronto Software Lab<br>bmahjour@ca.ibm.com</font><br><BR>
</body></html>