[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

Serge Pavlov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 05:54:27 PST 2025


spavloff wrote:

> > If strict floating-point semantics are required at this call site, they are are required on every relevant call in this function. It means strictfp is a function attribute. Does anything prevents us from removal strictfp from all call sites?
>
> I think that takes us back to @kpneal's history, "Then we found that basic blocks were being optimized when they didn't belong to a function so we couldn't get to the where the strictfp attribute was located. The solution was to add the attribute to every function call."

It sounds like a transient property, used in very specific cases. We could return to this problem later, when/if transition to bundles happens.

What about this PR? With it `strictfp` can be used as an indicator of a call that requires special handling for both constrained functions and calls with FP bundles, while both coexist. 

https://github.com/llvm/llvm-project/pull/122735


More information about the llvm-commits mailing list