Files
llvm-project/flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
jeanPerier a6df7eb063 [flang] allow rebox/embox of OPTIONAL (#194319)
Delay materialization of branches when building local temporary
descriptor for OPTIONAL from hlfir-to-fir until pre-cg-rewrite.
This makes the IR easier to analyze with OPTIONAL (for instance alias
analysis does not need to handle the branches to find the source).

This is done by adding an "optional" attribute to fir.embox, fir.rebox,
and fir.rebox_assumed_rank to indicate that their cogeneration must be
conditional.

The conditional aspect is implemented in pre-cg-rewrite to avoid
complexifying codegen and the fir.cg dialect.

Assisted by: Claude
2026-04-28 15:00:46 +02:00

7.3 KiB