search for: z_is_never_zero

Displaying 6 results from an estimated 6 matches for "z_is_never_zero".

2013 Nov 01
3
[LLVMdev] Add a 'notrap' function attribute?
...ch seems to go >> better along how it has been done previously (fpmath) and might >> open the door for separate non-language-specific optimizations. > > The large complication that you end up with a scheme like this is maintaining control dependencies. For example: > > if (z_is_never_zero()) { > x = y / z !notrap > ... > } > > the !notrap asserts that the division won't trap, which is good, but also makes it safe to speculatively execute. That's the desired effect, but not in this instance, because it will allow hoisting outside of the current block: >...
2013 Nov 01
0
[LLVMdev] Add a 'notrap' function attribute?
...roach seems to go > better along how it has been done previously (fpmath) and might > open the door for separate non-language-specific optimizations. > > The large complication that you end up with a scheme like this is > maintaining control dependencies. For example: > > if (z_is_never_zero()) { > x = y / z !notrap > ... > } > > the !notrap asserts that the division won't trap, which is good, but > also makes it safe to speculatively execute. That's the desired > effect, but not in this instance, because it will allow hoisting > outside of the current...
2013 Nov 01
0
[LLVMdev] Add a 'notrap' function attribute?
...ut OTOH the metadata approach seems to go > better along how it has been done previously (fpmath) and might > open the door for separate non-language-specific optimizations. The large complication that you end up with a scheme like this is maintaining control dependencies. For example: if (z_is_never_zero()) { x = y / z !notrap ... } the !notrap asserts that the division won't trap, which is good, but also makes it safe to speculatively execute. That's the desired effect, but not in this instance, because it will allow hoisting outside of the current block: x = y / z !notrap if (z...
2013 Nov 01
4
[LLVMdev] Add a 'notrap' function attribute?
Hi Nadav, On 10/31/2013 08:53 PM, Nadav Rotem wrote: > data-parallel languages which have a completely different semantics. In > OpenCL/Cuda you would want to vectorize the outermost loop, and the > language guarantees that it is safe to so. Yeah. This is the separate (old) discussion and not strictly related to the problem at hand. Better if-conversion benefits more than OpenCL C
2013 Nov 01
3
[LLVMdev] Add a 'notrap' function attribute?
...in the metadata. Andy, Arnold (CC'd) and I have been discussing this in a slightly-different context, and briefly, this means adding all of the relevant conditional branch inputs to the metadata, and ensuring dominance before the metadata is respected. For example: > > if (i1 %c = call z_is_never_zero()) { > %x = %y / %z !notrap !{ %c } > ... > } > > and so if we run across this situation: > > %x = %y / %z !notrap !{ %c } > if (i1 %c = call z_is_never_zero()) { > ... > } > > we can test that the %c does not dominate %x, and so the metadata ne...
2013 Nov 01
0
[LLVMdev] Add a 'notrap' function attribute?
...gt; Andy, Arnold (CC'd) and I have been discussing this in a > slightly-different context, and briefly, this means adding all of > the relevant conditional branch inputs to the metadata, and ensuring > dominance before the metadata is respected. For example: > > if (i1 %c = call z_is_never_zero()) { > %x = %y / %z !notrap !{ %c } > ... > } > > and so if we run across this situation: > > %x = %y / %z !notrap !{ %c } > if (i1 %c = call z_is_never_zero()) { > ... > } > > we can test that the %c does not dominate %x, and so the metadata > needs to be...