[all-commits] [llvm/llvm-project] 762a17: [CIR] Upstream support for cir.indirectbr (#169967)
Andres-Salamanca via All-commits
all-commits at lists.llvm.org
Fri Dec 5 16:12:59 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 762a171b3d6f6eb64dc5a844fcb25caa4ece7d00
https://github.com/llvm/llvm-project/commit/762a171b3d6f6eb64dc5a844fcb25caa4ece7d00
Author: Andres-Salamanca <andrealebarbaritos at gmail.com>
Date: 2025-12-05 (Fri, 05 Dec 2025)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.h
M clang/lib/CIR/CodeGen/CIRGenModule.cpp
M clang/lib/CIR/CodeGen/CIRGenModule.h
M clang/lib/CIR/CodeGen/CIRGenStmt.cpp
M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
M clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
M clang/test/CIR/CodeGen/label-values.c
A clang/test/CIR/IR/indirect-br.cir
Log Message:
-----------
[CIR] Upstream support for cir.indirectbr (#169967)
This PR upstreams support for the `cir.indirectBr` operation, which is
used to implement GCC’s labels-as-values `indirect goto`.
To ensure correct lowering, we introduce precise bookkeeping to
associate each `block_address` operation with its corresponding `label`
op. This is required because a `block_address` may be emitted before the
`label` it refers to. In such cases, the reference is deferred and later
resolved by `resolveBlockAddresses`, which guarantees that all
`indirectBr` successors are emitted in the correct and fully resolved
order.
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