From a95a28a5b05367860b2be33cd5406e35de632aaa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 3 Feb 2023 12:55:53 -0800 Subject: [PATCH] Fix build problems and minor cosmetic issues This change fixes a clang-specific build problem and a few minor cosmetic issues with the fp-accuracy intrinsic patch. --- llvm/docs/LangRef.rst | 2 +- llvm/include/llvm/Analysis/TargetLibraryInfo.h | 4 ++-- llvm/lib/CodeGen/FPBuiltinFnSelection.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 055e0208d58eb..acba8b25c4d81 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -23134,7 +23134,7 @@ intrinsic has any callsite attributes begining with "fpbuiltin-" that the code performing the transformation does not recognize. Unless otherwise specified using callsite attributes, the fpbuiltin intrinsics -do not set ``errno`` or and are not guaranteed to maintain correct +do not set ``errno`` and are not guaranteed to maintain correct floating-point exception state. All fpbuiltin intrinsics are overloaded intrinsics which may operate on any diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h index 3a025df53f7c7..3a8c72a378137 100644 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h +++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h @@ -24,7 +24,7 @@ class Function; class Module; class Triple; -/// Describes a possible implementation of a floating point builtin operation +/// Describes a possible implementation of a floating point builtin operation. struct AltMathDesc { Intrinsic::ID IntrinID; Type::TypeID BaseFPType; @@ -79,7 +79,7 @@ class TargetLibraryInfoImpl { } /// Alternate math library functions - sorted by intrinsic ID, then type, - /// then vector size, then accuracy + /// then vector size, then accuracy std::vector AltMathFuncDescs; /// Vectorization descriptors - sorted by ScalarFnName. diff --git a/llvm/lib/CodeGen/FPBuiltinFnSelection.cpp b/llvm/lib/CodeGen/FPBuiltinFnSelection.cpp index 0497cd7ab92ef..24f924ffb9c8d 100644 --- a/llvm/lib/CodeGen/FPBuiltinFnSelection.cpp +++ b/llvm/lib/CodeGen/FPBuiltinFnSelection.cpp @@ -74,7 +74,7 @@ static bool selectFnForFPBuiltinCalls(const TargetLibraryInfo &TLI, dbgs() << BuiltinCall.getRequiredAccuracy().value() << "\n"; }); - StringSet RecognizedAttrs = {FPBuiltinIntrinsic::FPBUILTIN_MAX_ERROR}; + StringSet<> RecognizedAttrs = {FPBuiltinIntrinsic::FPBUILTIN_MAX_ERROR}; if (BuiltinCall.hasUnrecognizedFPAttrs(RecognizedAttrs)) { report_fatal_error( Twine(BuiltinCall.getCalledFunction()->getName()) + @@ -142,7 +142,7 @@ class FPBuiltinFnSelectionLegacyPass : public FunctionPass { return runImpl(*TLI, F); } - void getAnalysisUsage(AnalysisUsage &AU) const { + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesCFG(); AU.addRequired(); AU.addPreserved();