From 243eb9ecbbc6775e346e94025bd255bbceac9fca Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 8 Dec 2011 22:15:21 +0000 Subject: Enhance both TargetLibraryInfo and SelectionDAGBuilder so that the latter can use the former to prevent the formation of libm SDNode's when -fno-builtin is passed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146193 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/SelectionDAGISel.h | 2 ++ include/llvm/Target/TargetLibraryInfo.h | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'include') diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index 09be4fb5eb..3c5c5df39a 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -29,6 +29,7 @@ namespace llvm { class MachineFunction; class MachineInstr; class TargetLowering; + class TargetLibraryInfo; class TargetInstrInfo; class FunctionLoweringInfo; class ScheduleHazardRecognizer; @@ -42,6 +43,7 @@ class SelectionDAGISel : public MachineFunctionPass { public: const TargetMachine &TM; const TargetLowering &TLI; + const TargetLibraryInfo *LibInfo; FunctionLoweringInfo *FuncInfo; MachineFunction *MF; MachineRegisterInfo *RegInfo; diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index 25098705ac..0d7a949517 100644 --- a/include/llvm/Target/TargetLibraryInfo.h +++ b/include/llvm/Target/TargetLibraryInfo.h @@ -48,6 +48,12 @@ namespace llvm { ceill, /// float ceilf(float x); ceilf, + /// double copysign(double x, double y); + copysign, + /// float copysignf(float x, float y); + copysignf, + /// long double copysignl(long double x, long double y); + copysignl, /// double cos(double x); cos, /// long double cosl(long double x); @@ -137,12 +143,24 @@ namespace llvm { memset, /// void memset_pattern16(void *b, const void *pattern16, size_t len); memset_pattern16, + /// double nearbyint(double x); + nearbyint, + /// float nearbyintf(float x); + nearbyintf, + /// long double nearbyintl(long double x); + nearbyintl, /// double pow(double x, double y); pow, /// float powf(float x, float y); powf, /// long double powl(long double x, long double y); powl, + /// double rint(double x); + rint, + /// float rintf(float x); + rintf, + /// long dobule rintl(long double x); + rintl, /// double sin(double x); sin, /// long double sinl(long double x); @@ -175,6 +193,12 @@ namespace llvm { tanhl, /// float tanhf(float x); tanhf, + /// double trunc(double x); + trunc, + /// float truncf(float x); + truncf, + /// long double truncl(long double x); + truncl, NumLibFuncs }; -- cgit v1.2.3-70-g09d2