<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div><font color="#1F497D">Hal, is below comments on call handling looks OK to you ?</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> </font></div>
<div style="padding-left:36pt;">>   Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:356</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   @@ +355,3 @@</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   +  const bool IsAnnotatedParallel = CurLoop->isAnnotatedParallel();</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   +  // We dont support call instructions. however, we ignore few intrinsic</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   +  // and libfunc callsite. We don't allow non-intrinsic, non-libfunc callsite</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   ----------------</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">>   Why not? I understand that the vectorizer has these checks, but I don't see why this belongs in an LICM pass?</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">> </div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">> There is a possibility that call may modify aliasing behavior, which may defeat the purpose of versioning & runtime checks.</div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;"> </div>
<div style="padding-left:36pt;">Ah, good point. However, please then replace this check with an appropriate AA getModRef-type check for whether the call might alias with the relevant pointers (if the function, for example, does not alias with any of the loop-invariant
accesses, then it can't affect what you're trying to do, although you'll need to be somewhat more careful about adding the noalias metadata to those functions, etc.).</div>
<div> </div>
<div>I’m not sure that itself would be sufficient, consider indirect calls probably need to consider function pointer in runtime check.</div>
<div>Also there is a possibility that in call argument one of the runtime pointer escaped, in such cases it become more difficult to ensure correctness.</div>
<div>That’s why for simplicity I considered vectorizer approach to consider only few functions.</div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D">Can I keep this like vectorizer ?</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D">Regards,</font></div>
<div><font color="#1F497D">Ashutosh</font></div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>