search for: other_index

Displaying 1 result from an estimated 1 matches for "other_index".

2013 Nov 08
3
[LLVMdev] Loads moving across barriers
...the result of opt -S -basicaa -gvn on it. This example is essentially this: void foo(global float2* result, local float2* restrict data0, ...) { int id = get_local_id(0); // ... data0[id] = ...; barrier(); if (id < N) { float2 x = data0[idx]; int other_index = ...; data0[other_index] = x; } barrier(); result[id] = data0[id]; } This is transformed so that the load from data0 after the second barrier never occurs, but it is necessary. The final value written is replaced with a phi, so the value isn't reloaded for the th...