kpneal wrote:

> > I do have a ticket open to change the IRBuilder to check the function 
> > definition and set the strictfp mode automatically. But I pooched the 
> > branch on my end so I'll need to open a new ticket, hopefully this year. 
> > That still leaves hundreds of cases that need to be manually corrected.
> 
> The attribute `strictfp` requires refinement, which is outside of the 
> proposed changes and needs to be discussed separately. In particular a 
> function that changes FP environmet, but then restores it should not require 
> `strictfp` environment. It means `strictfp` should not be assigned 
> automatically.
Without the strictfp attribute the inliner will be allowed to inline that 
function that changes the FP environment into a function that is non-strictfp. 
Since we don't have FP barriers we'll then have optimizations moving 
instructions into and out of the inlined body. This can result in incorrect 
trap behavior, incorrect rounding happening, whatever, depending on how the FP 
environment is modified. So the strictfp attribute is required, period. What we 
need to do is reword the description in the LangRef to make this more clear.

https://github.com/llvm/llvm-project/pull/109798
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to