[PATCH] D17471: [NVPTX] Annotate param loads/stores as mayLoad/mayStore.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 11:21:02 PST 2016
jlebar added a comment.
In http://reviews.llvm.org/D17471#365176, @jholewinski wrote:
> I'm not sure I understand the relation to non-param loads/stores. Param loads/stores will never alias another address space, so arbitrary reordering with other loads/stores should be legal. Can you show an example of what you're seeing?
I looked more closely at the thing we were looking at, and you're right, it's unrelated.
However, param loads/stores *can* alias with the global address space, yes? So given something like
a = ld.global [A]
st.param [B]
if (...) {
// use a
}
we cannot safely sink the load of 'a' into the branch:
st.param [B]
if (...) {
a = ld.global [A]
// use a
}
because A and B may alias.
Or, even if that's not possible, then one could conceive of a situation where we somehow have a param pointer aliasing another param:
param i32 A;
param i32* B = &A;
// now we have the same problem.
Anyway I agree this is mostly academic, given the kind of code we (currently) generate.
http://reviews.llvm.org/D17471
More information about the llvm-commits
mailing list