[LLVMdev] Instructions that cannot be duplicated
Eli Friedman
eli.friedman at gmail.com
Wed Oct 7 17:49:39 PDT 2009
On Wed, Oct 7, 2009 at 11:20 AM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> Is there a current way to specify that an instruction or function call
> cannot be duplicated and thus any optimizations that might want to duplicate
> this instruction would fail?
No. Anything can be duplicated. That could change, but you would
need to make a strong case for why other solutions won't work.
> which violates opencl, which can cause undefined behavior on the underlying
> hardware, as each barrier is unique.
If you need to maintain uniqueness, there are other ways to do that
without preventing the global from being duplicated. For example, you
could associate each barrier with a unique global by making the
intrinsic take it as a parameter.
-Eli
More information about the llvm-dev
mailing list