[PATCH] D24816: [Target] move reciprocal estimate settings from TargetOptions to TargetLowering

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 15:22:58 PDT 2016


spatel created this revision.
spatel added reviewers: echristo, evandro, hfinkel.
spatel added a subscriber: llvm-commits.
Herald added subscribers: nemanjai, mehdi_amini, mcrosier.

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:
1. Remove the reciprocal estimate command-line debug option.
2. Add TargetRecip to TargetLowering.
3. Remove TargetRecip from TargetOptions.
4. Clean up the TargetRecip implementation to work with this new scheme.
5. Set the default reciprocal settings in TargetLoweringBase (everything is off).
6. Update the PowerPC defaults, users, and tests.
7. Update the x86 defaults, users, and tests.


https://reviews.llvm.org/D24816

Files:
  include/llvm/CodeGen/CommandFlags.h
  include/llvm/Target/TargetLowering.h
  include/llvm/Target/TargetOptions.h
  include/llvm/Target/TargetRecip.h
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/PowerPC/PPCTargetMachine.cpp
  lib/Target/TargetRecip.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86TargetMachine.cpp
  test/CodeGen/PowerPC/recipest.ll
  test/CodeGen/X86/recip-fastmath.ll
  test/CodeGen/X86/sqrt-fastmath-mir.ll
  test/CodeGen/X86/sqrt-fastmath.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24816.72114.patch
Type: text/x-patch
Size: 38876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160921/e9915939/attachment.bin>


More information about the llvm-commits mailing list