See D24815 for the clang side of this that turns command-line flags into a function attribute string.
The motivation for the change is that we can't have pseudo-global settings for codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level via FMF, metadata, or something else. But making them function attributes is at least an improvement over the current mess.
The ingredients of this patch are:
- Remove the reciprocal estimate command-line debug option.
- Add TargetRecip to TargetLowering.
- Remove TargetRecip from TargetOptions.
- Clean up the TargetRecip implementation to work with this new scheme.
- Set the default reciprocal settings in TargetLoweringBase (everything is off).
- Update the PowerPC defaults, users, and tests.
- Update the x86 defaults, users, and tests.
I figured with getTargetRecipForFunc we could remove this? It returns the struct...