kpn added a comment.

In D69272#1794630 <https://reviews.llvm.org/D69272#1794630>, @sepavloff wrote:

> Putting restriction on use of the pragma is of course, a temporary solution, 
> it is not usable in all cases. But for some cases it is usable in production 
> code. Where small pieces of code may be extracted into separate functions, 
> this solution can provide tolerable performance loss, if most part of the 
> program doesn't use constrained intrinsics. Warning prevents users from false 
> expectations. Use in production code ensures further development of the 
> feature.
>
> Full-fledged solution requires full support of constrained intrinsics in 
> optimizations. It is not clear how large this work is, but odd are that it 
> would require substantial efforts. It this case usable implementation of 
> 'pragma STDC FE_ACCESS' would postponed. The restricted solution can be 
> implemented much faster and it does not impede development of the 
> full-fledged one.


It depends on the definition of "usable" or "tolerable", and the definition 
that matters is the one users have.

If #pragma is restricted to no smaller than whole functions then a function 
that uses it inside the body won't compile. We made the decision instead of the 
user.

If #pragma is not restricted, but triggers worse performance in the rest of the 
function, then users can decide for themselves if that is acceptable.

We should leave the decision up to the end-user. The idea of always using 
constrained intrinsics if any constrained intrinsic is used in a function is 
our best bet at getting something in the hands of users sooner rather than 
later and without them having to do any rewriting of existing code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69272/new/

https://reviews.llvm.org/D69272



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to