[all-commits] [llvm/llvm-project] 149f92: [flang] Delete a trailing CYCLE that is the last s...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Tue Sep 15 02:16:24 PDT 2026


  Branch: refs/heads/users/ergawy/pft-delete-trailing-cycle
  Home:   https://github.com/llvm/llvm-project
  Commit: 149f92e7fb3e41af55dd55927cf612ed17b2f40a
      https://github.com/llvm/llvm-project/commit/149f92e7fb3e41af55dd55927cf612ed17b2f40a
  Author: ergawy <kareem.ergawy at gmail.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M flang/lib/Lower/PFTBuilder.cpp
    A flang/test/Lower/OpenMP/trailing-cycle.f90
    A flang/test/Lower/trailing-cycle.f90

  Log Message:
  -----------
  [flang] Delete a trailing CYCLE that is the last statement of its DO

A CycleStmt at the end of the body of its own DoConstruct is a no-op:
branching to the EndDoStmt and falling through to it are the same thing.
Branch analysis nonetheless marks the DoConstruct unstructured, which
costs the structured form of the loop and the induction variable
semantics that later passes rely on.

Delete such a CycleStmt in the PFT. The statement
must be unlabeled, so that it is not itself a branch target, and it must
name either no construct or this one.


  Commit: 8756ee115ca429c2d5dc209d1615f2daf30ea723
      https://github.com/llvm/llvm-project/commit/8756ee115ca429c2d5dc209d1615f2daf30ea723
  Author: ergawy <kareem.ergawy at gmail.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M flang/lib/Lower/PFTBuilder.cpp

  Log Message:
  -----------
  Add assertion


Compare: https://github.com/llvm/llvm-project/compare/434101d5768d...8756ee115ca4

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