On Sat, 28 Jun 2014, Ulrich Drepper wrote:
On Sat, Jun 28, 2014 at 6:42 AM, Marc Glisse <marc.gli...@inria.fr> wrote:
Ping,
nobody has an opinion on this? Or some explanation why I am mistaken to
believe that #pragma target makes it safer now?
It would enable a number of optimizations, like constant propagation, FMA
contraction, etc. It would also allow us to remove several builtins.
I see no problem with using the array-type access to the registers.
As for replacing the builtins with arithmetic operators: I appreciate
the possibility for optimization. But is there any chance the calls
could not end up being implemented with a vector instruction? I think
that would be bad. The intrinsics should be a way to guarantee that
the programmer can create vector instructions. Otherwise we might
just not support them.
There is always a risk, but then even with builtins I think there was a
small risk that an RTL optimization would mess things up. It is indeed
higher if we expose the operation to the optimizers earlier, but it would
be a bug if an "optimization" replaced a vector operation by something
worse. Also, I am only proposing to handle the most trivial operations
this way, not more complicated ones (like v[0]+=s) where we would be
likely to fail generating the right instruction. And the pragma should
ensure that the function will always be compiled in a mode where the
vector instruction is available.
ARM did the same and I don't think I have seen a bug reporting a
regression about it (I haven't really looked though).
Thanks,
--
Marc Glisse