diff options
| author | paperchalice <liujunchang97@outlook.com> | 2025-10-22 14:23:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-22 06:23:04 +0000 |
| commit | 76f15ead0100e1a846f3e8d055d91ac669e297be (patch) | |
| tree | e5f8cb07b31bcf834059285110c87fc57d7f9ba2 /llvm/lib/CodeGen/CommandFlags.cpp | |
| parent | 14d50bc7d33f598001c7759fe3d61cf1d8b64ef8 (diff) | |
| download | llvm-76f15ead0100e1a846f3e8d055d91ac669e297be.zip llvm-76f15ead0100e1a846f3e8d055d91ac669e297be.tar.gz llvm-76f15ead0100e1a846f3e8d055d91ac669e297be.tar.bz2 | |
[CodeGen][Target] Remove UnsafeFPMath uses (#164549)
Remove `UnsafeFPMath` uses, next is removing the command line option.
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/CommandFlags.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp index 0522698..7f19161 100644 --- a/llvm/lib/CodeGen/CommandFlags.cpp +++ b/llvm/lib/CodeGen/CommandFlags.cpp @@ -64,7 +64,6 @@ CGOPT_EXP(uint64_t, LargeDataThreshold) CGOPT(ExceptionHandling, ExceptionModel) CGOPT_EXP(CodeGenFileType, FileType) CGOPT(FramePointerKind, FramePointerUsage) -CGOPT(bool, EnableUnsafeFPMath) CGOPT(bool, EnableNoInfsFPMath) CGOPT(bool, EnableNoNaNsFPMath) CGOPT(bool, EnableNoSignedZerosFPMath) @@ -219,11 +218,11 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() { "Enable frame pointer elimination"))); CGBINDOPT(FramePointerUsage); + [[maybe_unused]] static cl::opt<bool> EnableUnsafeFPMath( "enable-unsafe-fp-math", cl::desc("Enable optimizations that may decrease FP precision"), cl::init(false)); - CGBINDOPT(EnableUnsafeFPMath); static cl::opt<bool> EnableNoInfsFPMath( "enable-no-infs-fp-math", @@ -552,7 +551,6 @@ TargetOptions codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) { TargetOptions Options; Options.AllowFPOpFusion = getFuseFPOps(); - Options.UnsafeFPMath = getEnableUnsafeFPMath(); Options.NoInfsFPMath = getEnableNoInfsFPMath(); Options.NoNaNsFPMath = getEnableNoNaNsFPMath(); Options.NoSignedZerosFPMath = getEnableNoSignedZerosFPMath(); @@ -706,7 +704,6 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features, if (getStackRealign()) NewAttrs.addAttribute("stackrealign"); - HANDLE_BOOL_ATTR(EnableUnsafeFPMathView, "unsafe-fp-math"); HANDLE_BOOL_ATTR(EnableNoInfsFPMathView, "no-infs-fp-math"); HANDLE_BOOL_ATTR(EnableNoNaNsFPMathView, "no-nans-fp-math"); HANDLE_BOOL_ATTR(EnableNoSignedZerosFPMathView, "no-signed-zeros-fp-math"); |
