[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/91017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change refactors RenderFloatingPointOptions() to eliminate some excessively complicated logic and a redundant switch statement. The logic being simplified is an artifact of the original -ffp-model imple

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/91017 >From 82e51e4cea0cb889842273fcac874bb52d6bd780 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 3 May 2024 14:14:58 -0700 Subject: [PATCH 1/2] [NFC][Driver] Clean up RenderFloatingPointOptions() This cha

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Zahira Ammarguellat via cfe-commits
@@ -3152,6 +3125,12 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, } break; } +// The StrictFPModel local variable is needed to report warnings +// in the wat we intend. If -ffp-model=strict has been used, we ---

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Zahira Ammarguellat via cfe-commits
@@ -2885,6 +2883,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, Range = RangeVal; break; } + zahiraam wrote: nit. no need for this line. https://github.com/llvm/llvm-project/pull/91017 __

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/91017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-06 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/91017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 7ec698e6edf5add1f0b49b42fba707bea4b80225 82e51e4cea0cb889842273fcac874bb52d6bd780 --

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/91017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
@@ -3225,11 +3204,10 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, if (!FPContract.empty()) CmdArgs.push_back(Args.MakeArgString("-ffp-contract=" + FPContract)); - if (!RoundingFPMath) -CmdArgs.push_back(Args.MakeArgString("-fno-ro

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
@@ -3010,13 +2995,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, // Validate and pass through -ffp-contract option. case options::OPT_ffp_contract: { StringRef Val = A->getValue(); - if (PreciseFPModel) { a

[clang] [NFC][Driver] Clean up RenderFloatingPointOptions() (PR #91017)

2024-05-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/91017 This change refactors RenderFloatingPointOptions() to eliminate some excessively complicated logic and a redundant switch statement. The logic being simplified is an artifact of the original -ffp-model implemen