[PATCH] D24815: [clang] make reciprocal estimate codegen a function attribute
Eric Christopher via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 2 19:06:10 PDT 2016
echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.
Going to accept this pending the backend patch, but when that one is applied I wanted you to feel OK to add this. A couple of inline nitpick comments and some agreement that we should do something uniform for fast-math is all.
-eric
> CGCall.cpp:1735
> + // TODO: Are these all needed?
> + // unsafe/inf/nan/nsz are handled by instruction-level FastMathFlags.
> FuncAttrs.addAttribute("no-infs-fp-math",
Would be nice to get these pulled into a single fast-math string that's set and then used all over for sure. :)
> CGCall.cpp:1755
> + if (!Recips.empty())
> + FuncAttrs.addAttribute("mrecip",
> + llvm::join(Recips.begin(), Recips.end(), ","));
I commented on naming here in the backend patch, but just want to make them the same.
> attr-mrecip.c:1
> +// RUN: %clang_cc1 -mrecip=!sqrtf,vec-divf:3 -disable-llvm-optzns -emit-llvm %s -o - | FileCheck %s
> +
Shouldn't need to disable the llvm optimizations here.
https://reviews.llvm.org/D24815
More information about the cfe-commits
mailing list