[llvm-bugs] [Bug 27213] CFL-AA falsely reports NoAlias on Arguments

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 5 14:51:07 PDT 2016


George Burgess <george.burgess.iv at gmail.com> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from George Burgess <george.burgess.iv at gmail.com> ---
Fix committed as r265474.

The tl;dr of the problem was a collision of a few things:

- We mark a Node as a global or arg when visiting its edges
- We don't visit edges to "boring" nodes (e.g. constants)
- Stores themselves just create a link from value-being-stored to

So, from the example:

define void @foo(i32* %A, i32* %B) #0 {
  store i32 0, i32* %A, align 4
  %arrayidx = getelementptr inbounds i32, i32* %B, i64 1
  store i32 0, i32* %arrayidx, align 4
  ret void

...%A only had an edge to 'i32 0', which we didn't find interesting, so we
never visited it. Because we never visited it, we never reached the code that
notes that %A is an argument. Because we never noted %A was an argument, we
were more aggressive with marking it as NoAlias %B than we should have been.

The fix makes us mark things as args/globals before we start running through
their edges. (FWIW, I think there's a slightly faster way to do this if we
change the edge-visiting loop a bit, but I wanted to keep the fix as targeted
as possible)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160405/e47958a3/attachment-0001.html>

More information about the llvm-bugs mailing list