[clang] [clang] Pragma for llvm.loop.licm.disable (PR #188108)
Gang Chen via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 14:02:44 PDT 2026
cmc-rep wrote:
> Missing documentation in clang/docs/LanguageExtensions.rst. Missing release note.
>
> It's not clear to me how, exactly, we expect users to use this. "Disabling LICM" disables the pass itself, but there are other passes which can effectively perform hosting. So it's basically "do less hoisting", where exactly how much less is undefined.
Without further details, we have some domain-specific cases, in which the code pattern looks like the following:
kernel ( ... )
Loop:
RealKernel( ... )
The real kernel will be inlined, fully optimized as the loop-body. However, we really want to minimize the code hoisting out of the outer-loop. In our case, LICM is the main culprit.
Take one step back: this change simply exposes the already-existing llvm meta data: llvm.loop.licm.disable. It is up to users to decide when to use it.
https://github.com/llvm/llvm-project/pull/188108
More information about the cfe-commits
mailing list