Susan Tan (ス-ザン タン)
5cfd02f44a
[flang] change yielded iv value to be iv + step ( #174124 )
...
In cases where induction variables are used after the loop, like
```
write(*,*) (a(j),j=1,10)
print *, j
```
the incremented value should be used. Updating the FIRToSCF pass to
support this.
2026-01-05 07:31:11 -05:00
Ming Yan
a1f948947d
[Flang][Fir] Fix the comparison when lowering fir.iterate_while to scf.while. ( #171080 )
...
The comparison depends on the sign of the `step`, and when `step == 0` it always returns `false`.
2025-12-09 08:40:35 +08:00
Ming Yan
65b2793e8e
[Flang][Fir] Fix the error when lowering fir.iterate_while to scf while. ( #170630 )
...
The lowering fails when `fir.iterate_while` has no final value; this patch fixes the bug.
2025-12-04 20:15:18 +08:00
Valentin Clement (バレンタイン クレメン)
bd643bc141
[flang] Use default constructor for FIRToSCF pass ( #169741 )
2025-11-26 17:44:44 -08:00
Ming Yan
25c95ebfa8
[flang][fir] Convert fir.do_loop with the unordered attribute to scf.parallel. ( #168510 )
...
Refines the existing conversion to allow `fir.do_loop` annotated with
`unordered` to be lowered to `scf.parallel`, while other loops retain
their original lowering.
2025-11-25 14:43:41 +00:00
Matthias Springer
60ee0560da
[flang] Fix replaceAllUsesWith API violations (1/N) ( #154698 )
...
`replaceAllUsesWith` is not safe to use in a dialect conversion and will
be deactivated soon (#154112 ). Fix commit fixes some API violations.
Also some general improvements.
2025-08-21 11:48:14 +02:00
Terapines MLIR
c164e6309b
[flang][fir] Add conversion of fir.iterate_while to scf.while. ( #152439 )
...
This commmit is a supplement for
https://github.com/llvm/llvm-project/pull/140374 .
RFC:https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/6
2025-08-14 13:39:55 +08:00
yanming
02ab6f358c
[flang][fir][NFC] unify flang's code style with the rest.
2025-08-13 15:11:06 +08:00
Terapines MLIR
8e9ca057eb
[flang][fir] Add conversion of fir.if to scf.if. ( #149959 )
...
This commmit is a supplement for
https://github.com/llvm/llvm-project/pull/140374 .
RFC:https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/6
2025-07-25 10:03:50 +08:00
Maksim Levental
46f6df0848
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) ( #149915 )
...
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-21 19:37:17 -04:00
Lei Huang
d715ecba79
Revert "[flang][fir] Add fir.if -> scf.if and add filecheck test … ( #142965 )" ( #145345 )
...
This reverts commit 823750d873dff1d03865900042fc9b58e0f7f9c3.
Test causes segfault on aix flang builder.
2025-06-23 16:46:47 -04:00
Q
823750d873
[flang][fir] Add fir.if -> scf.if and add filecheck test file ( #142965 )
...
This commmit is a supplement for
https://github.com/llvm/llvm-project/pull/140374 .
RFC:https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/6
---------
Co-authored-by: ZhiQiang Fan <zhiqiang.fan@terapines.com>
2025-06-10 15:43:24 +08:00
MingYan
953302eb98
[flang][fir] Add FIR structured control flow ops to SCF dialect pass. ( #140374 )
...
This patch only supports the conversion from `fir.do_loop` to `scf.for`.
This pass is still experimental, and future work will focus on gradually
improving this conversion pass.
Co-authored-by: yanming <ming.yan@terapines.com>
2025-05-25 14:28:47 +08:00