[clang] [CIR] Implement mustprogress/uwtable attributes (PR #228093)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 11:51:38 PDT 2026


erichkeane wrote:

> > Adding this attribute also needs the trivial infinite loop handling? In classic CodeGen. CodeGenFunction::checkIfLoopMustProgress() removes the function’s mustprogress attribute when it encounters an empty loop with a constant true condition, but CIR’s emitForStmt, emitWhileStmt, and emitDoStmt currently have no equivalent handling?
> 
> OH! I just trusted that function was right :D Yeah, looks like i have to update that as well. Thats unfortunate...

Actually, I don't think this does?  It shouldn't be a problem if we have a non-must-progress loop inside of a must-progress function.  It appears that just stops the opt as well? 

So it is something we could add on later, as this isn't a breaking change, right? 

https://github.com/llvm/llvm-project/pull/228093


More information about the cfe-commits mailing list