<div dir="ltr">FYI, I'm looking into updating the tests.<div><br></div><div>Thanks,</div><div>Alina</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 8:38 AM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hal,<span class=""><br>
<br>
> We'll need to fix the bitcode files, or perhaps better yet, add some kind of auto-upgrade support (perhaps just by dropping the metadata that does not make sense?).<br>
<br></span>
I would prefer not to drop or heal incorrect TBAA metadata within LLVM.  The main reason to add the verifier was to fail noisily with bad TBAA metadata so that the frontends or the passes producing it could be fixed.<span class=""><br>
<br>
On 12/14/16, 7:50 AM, Hal Finkel wrote:<br>
> Building CXX object Bitcode/Benchmarks/Halide/loca<wbr>l_laplacian/CMakeFiles/halide_<wbr>local_laplacian.dir/local_<wbr>laplacian.bc.o<br>
> Access type node must be scalar<br>
>    %gray.host = load float*, float** %28, !tbaa !28<br>
> !28 = !{!29, !29, i64 0}<br>
> !29 = !{!"gray.host"}<br>
> Access type node must be scalar<br>
>    %gray.buffer = load %struct.buffer_t*, %struct.buffer_t** %29, !tbaa !30<br>
> !30 = !{!31, !31, i64 0}<br>
> !31 = !{!"gray.buffer"}<br>
> Access type node must be scalar<br>
>    %input.host = load i16*, i16** %30, !tbaa !32<br>
> !32 = !{!33, !33, i64 0}<br>
> !33 = !{!"input.host"}<br>
> Access type node must be scalar<br>
>    %input.buffer = load %struct.buffer_t*, %struct.buffer_t** %31, !tbaa !34<br>
> !34 = !{!35, !35, i64 0}<br>
> !35 = !{!"input.buffer"}<br>
<br></span>
These look fairly easy to fix though -- the base type and struct type operands directly point to the TBAA root.  I think the right representation is:<span class=""><br>
<br>
    %input.buffer = load %struct.buffer_t*, %struct.buffer_t** %31, !tbaa !34<br>
 !34 = !{!35, !35, i64 0}<br></span>
 !35 = !{!"input.buffer", !36}<br>
 !36 = !{!"halide tbaa root"}<span class=""><br>
<br>
    %input.host = load i16*, i16** %30, !tbaa !32<br>
 !32 = !{!33, !33, i64 0}<br></span>
 !33 = !{!"input.host", !36}  ;; !36 defined above<br>
<br>
Assuming that you want to denote !32 and !34 to be NoAlias.<br>
<br>
Note: As far as I can tell, given the IR above, today (without the verifier) they would be seen as MayAlias since they have different TBAA roots.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- Sanjoy<br>
</font></span></blockquote></div><br></div>