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
7.3 KiB
7.3 KiB