[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

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

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

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

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-09 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID = options::OPT_f

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID = options::OPT_f

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -2842,9 +2862,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, << Args.MakeArgString("-ffp-model=" + FPModel) << Args.MakeArgString("-ffp-model=" + Val); if (Val.equals("fast")) { -optID = options::OPT_f

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; AaronBallman wrote: Oh! Thank you for mentioning they're in different `switch` statements, I had missed that as well.

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

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

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; andykaylor wrote: This is falling through from OPT_Ofast to OPT_ffast_math. I think we still want that to happen. It's

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Fangrui Song via cfe-commits
@@ -3061,22 +3080,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, continue; [[fallthrough]]; MaskRay wrote: Should fallthrough still be used? https://github.com/llvm/llvm-project/pull/81173 _

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes This refactors the fast-math handling in the clang driver, moving the settings into a lambda that is shared by the -ffp-model=fast and -ffast-math code. Previously the -ff

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/81173 This refactors the fast-math handling in the clang driver, moving the settings into a lambda that is shared by the -ffp-model=fast and -ffast-math code. Previously the -ffp-model=fast handler changed the loca