[Mlir-commits] [mlir] [flang] [llvm] [flang][Draft/RFC] Set unsafe_fp_math attribute for -ffast-math (PR #79301)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 24 07:10:49 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 33ecef9812e2c9bfadef035b8e34a949acae2abc 5548f7db920fe05d4f809c07b6fe3f8bc2c80b10 -- flang/include/flang/Optimizer/Transforms/Passes.h flang/include/flang/Tools/CLOptions.inc flang/include/flang/Tools/CrossToolHelpers.h flang/lib/Frontend/FrontendActions.cpp flang/lib/Optimizer/Transforms/FunctionAttr.cpp mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/include/flang/Tools/CLOptions.inc b/flang/include/flang/Tools/CLOptions.inc
index 69be13cb1d..e1357d0397 100644
--- a/flang/include/flang/Tools/CLOptions.inc
+++ b/flang/include/flang/Tools/CLOptions.inc
@@ -315,7 +315,8 @@ inline void createDefaultFIRCodeGenPassPipeline(
   // Add function attributes
   fir::FunctionAttrTypes functionAttrs;
 
-  if (config.FramePointerKind != llvm::FramePointerKind::None || config.UnsafeFPMath) {
+  if (config.FramePointerKind != llvm::FramePointerKind::None ||
+      config.UnsafeFPMath) {
     if (config.FramePointerKind == llvm::FramePointerKind::NonLeaf)
       functionAttrs.framePointerKind =
           mlir::LLVM::framePointerKind::FramePointerKind::NonLeaf;

``````````

</details>


https://github.com/llvm/llvm-project/pull/79301


More information about the Mlir-commits mailing list