[PATCH] D25440: [Target] remove TargetRecip class; move reciprocal estimate isel functionality to TargetLowering

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 10:13:37 PDT 2016


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

This is a follow-up to https://reviews.llvm.org/D24816 - where we changed reciprocal estimates to be function attributes rather than TargetOptions.

This patch is intended to be a structural, but not functional change. By moving all of the TargetRecip functionality into TargetLowering, we can remove all of the reciprocal estimate state, shield the callers from the string format implementation, and simplify/localize the logic needed for a target to enable this.

If a function has a "reciprocal-estimates" attribute, those settings may override the target's default reciprocal preferences for whatever operation and data type we're trying to optimize. If there's no attribute string or specific setting for the op/type pair, just use the target default settings.

As noted earlier, a better solution would be to move the reciprocal estimate settings to IR instructions and SDNodes rather than function attributes, but that's a multi-step job that requires infrastructure improvements. I intend to work on that, but it's not clear how long it will take to get all the pieces in place.


https://reviews.llvm.org/D25440

Files:
  include/llvm/Target/TargetLowering.h
  include/llvm/Target/TargetOptions.h
  include/llvm/Target/TargetRecip.h
  lib/CodeGen/TargetLoweringBase.cpp
  lib/Target/CMakeLists.txt
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/TargetRecip.cpp
  lib/Target/X86/X86ISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25440.74141.patch
Type: text/x-patch
Size: 32539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161010/4f6be55c/attachment-0001.bin>


More information about the llvm-commits mailing list