[PATCH] D26348: Allow convergent attribute for function arguments
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 12 14:58:47 PST 2017
mehdi_amini added a comment.
In https://reviews.llvm.org/D26348#674679, @dark_sylinc wrote:
> I've given it a little more thought during coffee break.
>
> divergent_branch, divergent_index, convergent_branch & convergent_index aren't enough.
> At least one more modifier is needed: cannot_diverge (or similar name).
You just figured what this patch is about :)
The only thing the current patch is doing is exactly adding this knowledge to LLVM, you wrote
float4 texture( cannot_diverge_branch sampler2D texSampler, float2 uv ); //Internally implemented by LLVM to map to a GPU instruction(s).
This patch is proposing:
float4 texture(convergent sampler2D texSampler, float2 uv ); //Internally implemented by LLVM to map to a GPU instruction(s).
I don't think we really need to care about tagging variables right now, there might be some more optimizations possible, but that should be addressed separately.
> **I cannot stress enough this should be a priority bug.**
As I mentioned previously, I believe it is very easy to fix, no need to change LLVM: marking the `texture` operation as having unknown side-effect should be enough.
https://reviews.llvm.org/D26348
More information about the llvm-commits
mailing list