[PATCH] D47509: [AMDGPU] Track occupancy in MFI

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 00:35:14 PDT 2018


rampitec added a comment.

In https://reviews.llvm.org/D47509#1115824, @arsenm wrote:

> The problem with this is until we can serialize MachineFunctionInfo, this is going fo further degrade MIR tests.


That did not degrade mir tests so far because all what can be recorded from an original function is lost anyway. Default is to have full 10 waves, unless further limited by an attribute (which is lost for mir), static lds usage (which is lost as well) or scheduler register usage (which was never here until this change).



================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:4258-4262
+    SDValue Res = AMDGPUTargetLowering::LowerGlobalAddress(MFI, Op, DAG);
+    MachineFunction &MF = DAG.getMachineFunction();
+    SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>();
+    MFI->limitOccupancy(MF);
+    return Res;
----------------
arsenm wrote:
> Why is this here?
allocateLDSGlobal() belongs to AMDGPUMachineFunction, not SIMachineFunctionInfo. The choice is to either make it virtual or handle in the single place it is really used.


https://reviews.llvm.org/D47509





More information about the llvm-commits mailing list