[clang] [llvm] [HLSL] Add allresourcesbound option to DXC driver and set corresponding module flag (PR #173411)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 29 15:51:01 PST 2025
bob80905 wrote:
This flag should, according to the issue, just be passed through, it shouldn't change any codegen. I imagine it's actually used by backends.
Looks like you're referring to `\tools\clang\lib\CodeGen\CGHLSLMS.cpp:378`
What I understand is that the /Gfa flag can't be set in DXC unless the `-all-resources-bound flag` is set.
This PR is just introducing the all-resources-bound flag, so adjusting Gfa behavior now should be irrelevant. However, looking at DXC, /Gfa is aliased with AvoidFlowControl, which, in `tools\clang\tools\dxcompiler\dxcompilerobj.cpp:1653`, does this:
```
if (Opts.AvoidFlowControl)
compiler.getCodeGenOpts().UnrollLoops = true;
```
And there is an option in clang and a cc1 option that is called `funroll_loops`, which might accomplish the same thing.
https://github.com/llvm/llvm-project/pull/173411
More information about the cfe-commits
mailing list