kpneal wrote:

> > WRT eliminating the constrained intrinsics completely, I thought that 
> > operand bundles could only be attached to function calls and not regular 
> > instructions? If I'm wrong, we _still_ have a problem because there are so 
> > many uses of the regular FP instructions that we can't be safe-by-default 
> > and still use those instructions. We'd need to keep some kind of the 
> > constrained intrinsics (or new intrinsics) that give us replacements for 
> > the regular FP instructions.
> 
> Right, we would need to introduce new llvm.fadd etc. to carry bundles. If 
> there are no bundles these could fold back to the regular instruction

Good. The new intrinsics will be unknown to the optimization passes and thus be 
"safe by default". 

The target-specific intrinsics with bundles will be "unsafe by default", but 
that's a step up from the current just plain unsafe.

We will need someone to go through and audit the libm-style intrinsics and make 
sure all optimizations of them are safe before we can switch over. Those are 
"unsafe by default" since the optimizers know about them already.

Folding back to regular instructions will be fairly limited I expect until 
perhaps very late in the target-specific pipeline. Otherwise we run into the 
instruction reordering issue. The outliner can probably sometimes extract the 
non-strictfp parts of a function and mark the new outlined function as not 
being strictfp which would then enable folding back to instructions.

Do we know how we're going to get bundles through the SelectionDAG?

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