<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 12/17/18 4:19 AM, Markus Lavin via llvm-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:HE1PR0701MB245903A96C637F1C3869F697E8BC0@HE1PR0701MB2459.eurprd07.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I have been looking at using LazyValueInfo to improve BasicAA for some cases but have noted some issues with LVI<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">1. The interface (e.g. getConstantRange) seem to expect pointer-to-non-const objects which is a bit troublesome if you want to use the analysis from a place where you have pointer-to-const. Resorting
 to const_cast is obviously undesirable.</span></p>
</div>
</blockquote>
<p>There are a number of interfaces that, for historical reasons, don't take const-qualified pointers (although they probably should). For some of these we've created wrappers to hide the const_casts (e.g., in ValueTracking).<br>
</p>
<blockquote type="cite" cite="mid:HE1PR0701MB245903A96C637F1C3869F697E8BC0@HE1PR0701MB2459.eurprd07.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">2. Assumption patterns of the form ‘icmp <pred> (add Val, Offset)’ (<a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Analysis/LazyValueInfo.cpp#L1097" moz-do-not-send="true">https://github.com/llvm-mirror/llvm/blob/master/lib/Analysis/LazyValueInfo.cpp#L1097</a>)
 will not make it through the assumption cache after commit <a href="https://github.com/llvm-mirror/llvm/commit/a6e44bd6350ff4aaa40b104abff1e28a9918ef87" moz-do-not-send="true">
https://github.com/llvm-mirror/llvm/commit/a6e44bd6350ff4aaa40b104abff1e28a9918ef87</a></span></p>
</div>
</blockquote>
<p>Seems like an oversight (and a lack of sufficient regressions tests). Please feel free to submit a patch to fix this.
<br>
</p>
<blockquote type="cite" cite="mid:HE1PR0701MB245903A96C637F1C3869F697E8BC0@HE1PR0701MB2459.eurprd07.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Is this something worth fixing or does this mean that LVI is not very much used and there might even be plans to remove/replace it in the future?</span></p>
</div>
</blockquote>
<p>LVI is still very much in use (at least in JumpThreading and CorrelatedValuePropagation). I know that some people have discussed possible rewrites over the years, but I don't know of any immediate plans.<br>
</p>
<p> -Hal<br>
</p>
<blockquote type="cite" cite="mid:HE1PR0701MB245903A96C637F1C3869F697E8BC0@HE1PR0701MB2459.eurprd07.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-Markus<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>