[llvm] [AMDGPU][NewPM] Port "AMDGPUResourceUsageAnalysis" to NPM (PR #130959)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 06:25:12 PDT 2025
================
@@ -44,23 +45,43 @@ struct AMDGPUResourceUsageAnalysis : public MachineFunctionPass {
SmallVector<const Function *, 16> Callees;
};
- AMDGPUResourceUsageAnalysis() : MachineFunctionPass(ID) {}
+ SIFunctionResourceInfo
+ analyzeResourceUsage(const MachineFunction &MF,
+ uint32_t AssumedStackSizeForDynamicSizeObjects,
+ uint32_t AssumedStackSizeForExternalCall) const;
+};
+
+struct AMDGPUResourceUsageAnalysisWrapperPass : public MachineFunctionPass {
+ using ResultT = AMDGPUResourceUsageAnalysisImpl::SIFunctionResourceInfo;
----------------
JanekvO wrote:
Apologies to continue hammering on about this but is there a reason it's called `ResultT` here and `Result` in `AMDGPUResourceUsageAnalysis` is there some naming clash? Also, is this naming some sort of convention or could we change it to something a bit more descript? Perhaps `using FunctionResourceInfo = AMDGPUResourceUsageAnalysisImpl::SIFunctionResourceInfo;` or some derivative/shortened version thereof
https://github.com/llvm/llvm-project/pull/130959
More information about the llvm-commits
mailing list