6 Commits

Author SHA1 Message Date
Shunsuke Watanabe
fd4e77cf33
[flang][driver] Accelerate complex division when -ffast-math is specified (#159689)
This patch accelerates complex division by passing
`-complex-range=basic` to the frontend when the `-ffast-math` option is
specified. This behavior is the same as `-fcomplex-arithmetic=basic`. A
warning is issued if a different value is specified for
`-fcomplex-arithmetic=`. The warning conditions will be unified with
clang.
2025-10-01 13:03:23 +09:00
Shunsuke Watanabe
c9900015a9
[flang] Add -fcomplex-arithmetic= option and select complex division algorithm (#146641)
This patch adds an option to select the method for computing complex
number division. It uses `LoweringOptions` to determine whether to lower
complex division to a runtime function call or to MLIR's `complex.div`,
and `CodeGenOptions` to select the computation algorithm for
`complex.div`. The available option values and their corresponding
algorithms are as follows:
- `full`: Lower to a runtime function call. (Default behavior)
- `improved`: Lower to `complex.div` and expand to Smith's algorithm.
- `basic`: Lower to `complex.div` and expand to the algebraic algorithm.

See also the discussion in the following discourse post:
https://discourse.llvm.org/t/optimization-of-complex-number-division/83468

---------

Co-authored-by: Tarun Prabhu <tarunprabhu@gmail.com>
2025-07-09 13:43:54 +09:00
Corentin Jabot
c226d6c88f [Documentation][NFC] Remove invalid language specifiers in markdown code blocks 2023-10-07 16:05:56 +02:00
cor3ntin
6989c4842f
[Documentation] Fix some invalid references in sphinx documentation (#68239) 2023-10-05 14:40:59 +02:00
cor3ntin
b7ff03206d
[Documentation] Replace recommonmark by myst-parser (#65664)
Recommonmark has been deprecated, then archived last year. This was
tracked by: https://github.com/llvm/llvm-iwg/issues/30

See https://github.com/readthedocs/recommonmark

This patch migrates all our doc to use myst

Additional details for bot maintainers: https://discourse.llvm.org/t/maintenance-required-on-sphinx-build-bots/73612
2023-09-25 14:02:39 +02:00
David Truby
42220c5868 [flang][RFC] Proposal for complex number lowering through MLIR
This design document proposes lowering FIR complex number operations
through the MLIR complex dialect.

Differential Revision: https://reviews.llvm.org/D134364
2022-11-04 14:21:31 +00:00