[llvm] [NFC][DirectX] Infrastructure to collect shader flags for each function (PR #112967)
Damyan Pepper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 16:30:21 PDT 2024
================
@@ -65,15 +73,25 @@ void ComputedShaderFlags::print(raw_ostream &OS) const {
AnalysisKey ShaderFlagsAnalysis::Key;
-ComputedShaderFlags ShaderFlagsAnalysis::run(Module &M,
- ModuleAnalysisManager &AM) {
- return ComputedShaderFlags::computeFlags(M);
+DXILModuleShaderFlagsInfo ShaderFlagsAnalysis::run(Module &M,
+ ModuleAnalysisManager &AM) {
+ return computeFlags(M);
+}
+
+bool ShaderFlagsAnalysisWrapper::runOnModule(Module &M) {
+ MSFI = computeFlags(M);
+ return false;
}
PreservedAnalyses ShaderFlagsAnalysisPrinter::run(Module &M,
ModuleAnalysisManager &AM) {
- ComputedShaderFlags Flags = AM.getResult<ShaderFlagsAnalysis>(M);
- Flags.print(OS);
+ DXILModuleShaderFlagsInfo Flags = AM.getResult<ShaderFlagsAnalysis>(M);
+ OS << "; Shader Flags mask for Module:\n";
----------------
damyanp wrote:
This looks like it is actually a functional change? In which case we should have some tests to test the new functionality that's been added.
https://github.com/llvm/llvm-project/pull/112967
More information about the llvm-commits
mailing list