[flang] Control flow graph issues
authorV Donaldson <vdonaldson@nvidia.com>
Tue, 3 Jan 2023 18:31:30 +0000 (10:31 -0800)
committerV Donaldson <vdonaldson@nvidia.com>
Tue, 3 Jan 2023 22:46:25 +0000 (14:46 -0800)
commit609b789170625277f631139c790c22d527ff1eed
tree0f482dadf8967644dbbe3f767584202d86eee345
parent6b05a62a6b10bcdfc777dee4761f273a5c883cba
[flang] Control flow graph issues

Address several issues involving control flow graph generation and
structured code ops.

 - Fix a problem with constructs nested inside unstructured selection
   constructs. This is a general problem involving branches that are
   implied rather than explicit. It is addressed in the generic genFIR
   "wrapper" function that calls individual statement-specific genFIR calls.

 - The previous fix requires some compensating changes in IF and DO
   construct code lowering.

 - Streamline the code to generate explicit DO loop variable updates.

 - Fix a problem with the individual detailed genFIR calls made in the
   genFIR(SelectTypeConstruct) call.

 - Modify control flow graph generation to support the insertion of
   deallocation and finalization code when lowering most END <construct>
   statements.
flang/include/flang/Lower/PFTBuilder.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/PFTBuilder.cpp
flang/test/Lower/select-case-statement.f90