<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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 class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div></div></div></div></blockquote></span><div>Opps, you are right in my example basicaaa could do it potentially. Correct example is slightly different:</div><span class=""><div>int foo(struct S *ps, int i) {<br></div></span><div><span class=""><div>  ps->a[i] = 1;</div><div>  ps->b = 2;</div></span><div>  return ps->a[i];</div><div>}</div></div><div>Here basicaa cannot make sure that 'ps->a[i]' doesn't change after 'ps->b = 2' because if 'i == 10' all 3 memory accesses will read/write the same memory. And type information about S::a is required to disambiguate. With current TBAA 'ps->a[i]' is about random 'int' read.</div></div></div></div></blockquote><div><br></div><div>Yes, and without more info, in LLVM that read can legally touch ps->b.</div><div>So that makes sense.</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"><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Missing information here is the range inside struct S that could be accessed. </div></div></blockquote><div><br></div></span><div>What do you mean by "could be accessed".  Do you mean "valid to access in C"?</div></div></div></div></blockquote><div><br></div></span><div>By access I meant read/write memory i.e. that size of S::a inside the struct or at least information that only S::a is accessed in this place i.e. not S::b.</div></div></div></div></blockquote><div><br></div><div>Okay.</div><div><br></div><div>So what you want sounds reasonable to me ;-)</div><div><br></div></div></div></div>