[llvm] [DirectX] Update `DXILRootSignature` to not run analysis after data has been parsed (PR #146783)

Sarah Spall via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 07:59:27 PDT 2025


================
@@ -160,18 +160,17 @@ void DXContainerGlobals::addRootSignature(Module &M,
 
   assert(MMI.EntryPropertyVec.size() == 1);
 
-  auto &RSA = getAnalysis<RootSignatureAnalysisWrapper>();
+  auto &RSA = getAnalysis<RootSignatureAnalysisWrapper>().getRSInfo();
   const Function *EntryFunction = MMI.EntryPropertyVec[0].Entry;
-  const auto &FuncRs = RSA.find(EntryFunction);
+  const auto &RS = RSA.getDescForFunction(EntryFunction);
 
-  if (FuncRs == RSA.end())
+  if (!RS)
     return;
 
-  const RootSignatureDesc &RS = FuncRs->second;
   SmallString<256> Data;
   raw_svector_ostream OS(Data);
 
-  RS.write(OS);
+  RS->write(OS);
----------------
spall wrote:

isn't RS a reference, why are you using the arrow?

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


More information about the llvm-commits mailing list