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

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Mon Sep 14 06:13:16 PDT 2026


  Branch: refs/heads/users/ergawy/pft-delete-trailing-cycle
  Home:   https://github.com/llvm/llvm-project
  Commit: 434101d5768de2d3cb9e66f4ab877b828ca6b8fe
      https://github.com/llvm/llvm-project/commit/434101d5768de2d3cb9e66f4ab877b828ca6b8fe
  Author: ergawy <kareem.ergawy at gmail.com>
  Date:   2026-09-14 (Mon, 14 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.



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