[PATCH] D9375: An llvm.noalias intrinsic

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 19:34:55 PDT 2016


dberlin added a comment.

So, the summary says:

Also, on the data dependence, while poses obvious difficulties on the optimizer (and may of the patches are to address this), a strict control dependence is not sufficient (so we can't make it more like the lifetime intrinsics which take a pointer argument). Specifically, we need to be able to represent this kind of construct:
"void foo(T * restrict x, T * restrict y) {

  for (int i = 0; i < 1600; ++i)
    x[2*i+1] = y[2*i] + 1;

}"

Is this summary still correct?
If so, i want to understand this.  I don't want to make you do the work, i just want to understand what the issue is.

The inlined version will still have noalias calls that will not be able to be hoisted past the pointer arguments they take, no?

Why won't that just work?

Is there any way you could just provide me a bunch of examples that show "what broken thing will happen"?

(I'd say we should whiteboard it, but that seems hard :P)

(I'm also wondering, offhand, if memoryssa's memory versioning does not already automatically provide the thing we want - something that says "this thing goes with this version of memory state, and you can't hoist it above that  version of memory state". You'd take the memory version as the argument, and they would stay where they should - below that memory version)


http://reviews.llvm.org/D9375





More information about the llvm-commits mailing list