You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 21, 2026. It is now read-only.
The lifetime checker currently identifies temporaries by checking if the AllocaOp name starts with "ref.tmp". This string-based detection is fragile and could break if naming conventions change.
Current implementation:
auto name = allocaOp.getName();
// FIXME: "ref.tmp" naming is not reliable. Consider adding a unit attribute// is_temporary to AllocaOp that is set by CIRGen to definitively mark// temporaries. This would be more robust than string prefix matching.if (!name.starts_with("ref.tmp"))
returnfalse;
Proposed Solution
Add a unit attribute is_temporary to AllocaOp that is set by CIRGen when allocating temporaries. This would provide a reliable, semantic way to identify temporaries during lifetime analysis.
Desired approach:
if (!allocaOp.getIsTemporary())
returnfalse;
Context
This issue was identified during PR #2077 review. The FIXME is currently in the codebase at: