rsmith added a comment.

In https://reviews.llvm.org/D52839#1262449, @kpn wrote:

> I forgot to address the template question. I've spend the past 18 years doing 
> SystemZ backend work on multiple {,JIT} compilers. I'm not really in a 
> position to answer your question about how to handle getting these FP bits 
> down into C++ templates. I hope that won't hold up getting FENV_ACCESS 
> working for C compilations.


Actually, I think it should. If your approach doesn't extend to C++, then you 
have the wrong approach, and we should redesign it now rather than spend more 
time on it. (Also, we use TreeTransforms in C sometimes, too, so this actually 
isn't even a C++-specific design problem.)

I think there are two possible approaches to take here:

1. Treat the FP environment flags as a part of the global Sema state. Whenever 
Clang switches its current context, figure out the right FP environment for the 
new context, and switch the FP environment too. This'd necessitate storing the 
FP environment data on DeclContexts, which would likely otherwise be 
unnecessary.


https://reviews.llvm.org/D52839



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

Reply via email to