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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 09:07:09 PDT 2016


spatel added a comment.

I wondered how that prerequisite check for fast-math was currently handled:

  if (Options.UnsafeFPMath) {

which gets set by:

  // FIXME: This function needs to go away for a number of reasons:
  // a) global state on the TargetMachine is terrible in general,
  // b) there's no default state here to keep,
  // c) these target options should be passed only on the function
  //    and not on the TargetMachine (via TargetOptions) at all.
  void TargetMachine::resetTargetOptions(const Function &F) const {

...which made me think of this bug:
https://llvm.org/bugs/show_bug.cgi?id=23172

The world is broken in a way much bigger than inlining too strict or too loose reciprocal estimate codegen settings, isn't it?


https://reviews.llvm.org/D24816





More information about the llvm-commits mailing list