[clang] [CIR] Add inner-unroll-and-jam loop lowering to CIRGen (PR #235149)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 23 19:34:02 PDT 2026
================
@@ -1046,7 +1059,14 @@ def CIR_LoopHintAttr : CIR_Attr<"LoopHint", "loop_hint"> {
OptionalParameter<"uint32_t">:$pipeline_initiation_interval,
CIR_FlagParam<"licm_disabled">:$licm_disabled,
CIR_FlagParam<"parallel">:$parallel,
- OptionalParameter<"uint32_t">:$code_align);
+ OptionalParameter<"uint32_t">:$code_align,
+ CIR_FlagParam<"vectorized">:$vectorized,
+ OptionalParameter<"mlir::DistinctAttr">:$loop_id,
----------------
bcardosolopes wrote:
What needs `loop_id` in the inner hints? In classic, `llvm.loop.unroll_and_jam.followup_inner` is its own property list with its own distinct node, and it doesn't point back at the inner loop. Nothing in tree reads it here yet either (IIUC). If the lowering doesn't need it, I'd drop it, since an attribute holding another op's id goes stale as soon as a pass clones or deletes that loop, and nothing verifies it still names a loop nested in this one. If it is needed, the verifier should perhaps reject `loop_id` and `vectorized` outside `unroll_and_jam_inner`, since the description says they're only valid there.
https://github.com/llvm/llvm-project/pull/235149
More information about the cfe-commits
mailing list