[llvm] [DirectX][NFC] Refactor `DXILRootSignature` to follow the same pattern as other analysis (PR #146783)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 10:26:31 PDT 2025
================
@@ -636,13 +635,14 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
//===----------------------------------------------------------------------===//
bool RootSignatureAnalysisWrapper::runOnModule(Module &M) {
- FuncToRsMap = analyzeModule(M);
+ FuncToRsMap = std::make_unique<RootSignatureBindingInfo>(
+ RootSignatureBindingInfo(analyzeModule(M)));
return false;
}
void RootSignatureAnalysisWrapper::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
- AU.addRequired<DXILMetadataAnalysisWrapperPass>();
+ AU.addPreserved<DXILMetadataAnalysisWrapperPass>();
----------------
joaosaffran wrote:
Yes, changing from `addRequired` to `addPreserved` means we will not run the analysis, we will just use existing analysis results. Since that Analysis already run in the pipeline, there is no actual logic change here.
https://github.com/llvm/llvm-project/pull/146783
More information about the llvm-commits
mailing list