[all-commits] [llvm/llvm-project] a6df7e: [flang] allow rebox/embox of OPTIONAL (#194319)
jeanPerier via All-commits
all-commits at lists.llvm.org
Tue Apr 28 06:01:08 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6df7eb0638a452c55fcd44b90d95270e9ebf533
https://github.com/llvm/llvm-project/commit/a6df7eb0638a452c55fcd44b90d95270e9ebf533
Author: jeanPerier <jperier at nvidia.com>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
M flang/include/flang/Optimizer/CodeGen/CGPasses.td
M flang/include/flang/Optimizer/Dialect/FIROps.td
M flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
M flang/lib/Optimizer/Dialect/FIROps.cpp
M flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
M flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
M flang/test/Fir/fir-ops.fir
A flang/test/Fir/rebox-embox-optional-codegen.fir
M flang/test/Fir/rebox_assumed_rank_codegen.fir
M flang/test/HLFIR/declare-codegen.fir
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list