[all-commits] [llvm/llvm-project] ccd75b: [CIR] Introduce loop cleanup regions (#210212)
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Fri Jul 17 16:25:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ccd75bb4b9c6d9c2e149d355c35193ca554c99a0
https://github.com/llvm/llvm-project/commit/ccd75bb4b9c6d9c2e149d355c35193ca554c99a0
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/include/clang/CIR/Interfaces/CIRLoopOpInterface.td
M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
M clang/lib/CIR/Interfaces/CIRLoopOpInterface.cpp
A clang/test/CIR/IR/invalid-loop-cleanup.cir
A clang/test/CIR/IR/loop-cleanup.cir
M clang/unittests/CIR/ControlFlowTest.cpp
Log Message:
-----------
[CIR] Introduce loop cleanup regions (#210212)
For loops and while loops can create variables in their condition
regions that require per-iteration cleanup. The CIR dialect previously
had no clean way to represent these cleanups while maintaining a
separate condition region for the loop operation.
This change introduces an optional cleanup region to these loop ops and
updates the relevant region successor handling to reflect the insertion
of the cleanup region in the control flow when a non-empty cleanup
region is present.
The CFG flattening pass will handle routing the control flow through the
cleanup region in both the normal and EH unwind cases, but this is not
yet implemented. That will be added in a follow-up change, as will
creation of the cleanup region when it is needed during IR generation.
Assisted-by: Cursor / various models
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