<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 3:41 PM, Jeroen Dobbelaere <span dir="ltr"><<a href="mailto:jeroen.dobbelaere@gmail.com" target="_blank">jeroen.dobbelaere@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Mar 17, 2015 at 10:24 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">[..]</div></blockquote><div> </div></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Note that In !41, we loose the information about the 'short' member.<span class=""><br><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div></div></blockquote></span><div>I would start here :)<br></div><div> </div></div></div></span></div></blockquote><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>You should make it produce info about all the members.</div><span><div></div></span></div></div></div></blockquote></span><div>Sounds reasonable.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> </div><div dir="ltr"><div></div>[..]</div></blockquote></span><span class=""><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>One issue with getting array accesses right that I see, is that the 'offset' field can suddenly be variable.<br></div><div><br></div></div></blockquote><div><br></div></span><div>Not really. You can't say where it points, so the range would be "everything" anyway.</div><div>You should just say it accesses the entire array (but not anything else).</div><span><div><br></div></span></span></div></div></div></blockquote><div><br>In order to provide as detailed and accurate feedback as possible, my current changes to the tbaa analysis<br>take the (location) access size into account. This is because the tbaa path information itself does not<br>contain direct size information, only offsets. <br><br>Is there today already a way how such variable array access can be described ? </div></div></div></div></blockquote><div><br>You can't do this sanely without a lot of work, because it can overlap multiple actual variables and structs.</div><div><br></div><div>The way we did this in GCC was to just dynamically evaluate which parts of which structures it could access, and then combine all those types.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Is there a way to describe that we have an array of a certain type/size in the tbaa struct ?<br></div></div></div></div></blockquote><div><br></div><div> you can certainly describe it, but it would require metadata structure changes.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>Just looking at containment of types gives some information and will in certain cases fix incorrect behavior, but it will also result in performance degradation (due to more 'MayAliases') if offsets can not be taken into account in the way they are used today.<br><br></div>Greetings,<br><br></div><div class="gmail_quote">Jeroen Dobbelaere<br></div></div></div>
</blockquote></div><br></div></div>