[PATCH] Refactor reciprocal and reciprocal square root estimate into target-independent functions (part 2).

hfinkel at anl.gov hfinkel at anl.gov
Thu Sep 25 13:21:58 PDT 2014


LGTM, thanks!

================
Comment at: include/llvm/Target/TargetLowering.h:2632
@@ +2631,3 @@
+  /// returned by one of the above methods.
+  virtual unsigned getNRSteps(EVT VT) const {
+    return 0;
----------------
The number of iterations necessary for the reciprocal estimate and for the reciprocal sqrt estimate might be different. Please provide a way to differentiate (and I'd want to make really sure the target actually overrides this). Maybe:

  virtual unsigned getNRSteps(EVT VT, bool SqrtEst) const {
    llvm_unreachable("Target must provide the number of iterations");
  }

http://reviews.llvm.org/D5484






More information about the llvm-commits mailing list