[flang] Support arith::FastMathFlagsAttr for fir::CallOp.
authorSlava Zakharin <szakharin@nvidia.com>
Wed, 9 Nov 2022 23:18:50 +0000 (15:18 -0800)
committerSlava Zakharin <szakharin@nvidia.com>
Wed, 9 Nov 2022 23:31:09 +0000 (15:31 -0800)
commitbc955cae35d2a9ef018221566c55a23cea341a90
treea5538e0540b3b30b8475f264f689364c617def1e
parenta11cd0d94ed3cabf0998a0289aead05da94c86eb
[flang] Support arith::FastMathFlagsAttr for fir::CallOp.

The main purpose of this patch is to propagate fastmath attribute
to SimplifyIntrinsicsPass, so that the inline code can inherit
the call operation's attributes. Even though I added translation
of fastmath from fir::CallOp to LLVM::CallOp, there are no fastmath
attributes in LLVM IR. It looks like the translation drops it.
This will need additional commits.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D137602
flang/include/flang/Optimizer/Dialect/FIRDialect.td
flang/include/flang/Optimizer/Dialect/FIROps.td
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/test/Fir/fir-fast-math.fir [new file with mode: 0644]