================
@@ -140,8 +143,19 @@ analyzeModule(Module &M) {
RSD.StaticSamplersOffset = 0u;
RSDMap.insert(std::make_pair(F, RSD));
+ };
+
+ if (M.getTargetTriple().getEnvironment() ==
+ Triple::EnvironmentType::RootSignature) {
+ assert(RootSignatureNode->getNumOperands() == 1);
+ MDNode *RSDefNode = RootSignatureNode->getOperand(0);
+ HandleNode(RSDefNode, true);
+ return RSDMap;
}
+ for (MDNode *RSDefNode : RootSignatureNode->operands())
+ HandleNode(RSDefNode);
----------------
bogner wrote:
It's mostly a matter of style, but I think it might be slightly more readable
to keep this as a loop rather than pulling the lambda out like this. You'd need
to do the root signature book keeping before the loop:
```c++
bool AllowNullFunctions = false;
if (M.getTargetTriple().getEnvironment() ==
Triple::EnvironmentType::RootSignature) {
assert(RootSignatureNode->getNumOperands() == 1);
AllowNullFunctions = true;
}
for (MDNode *RSDefNode : RootSignatureNode->operands())
// ...
```
What do you think?
https://github.com/llvm/llvm-project/pull/156373
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits