[PATCH] D36004: AMDGPU: Analyze callee resource usage in AsmPrinter

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 18:34:29 PDT 2017


arsenm added a comment.

I accidentally committed this in r309781



================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:516
+
+  for (const MachineBasicBlock &MBB : MF) {
+    for (const MachineInstr &MI : MBB) {
----------------
rampitec wrote:
> Is this expensive loop really needed? Why cannot we rely on isPhysRegUsed?
This is what it did prior to r300482. isPhysRegUsed sees the regmasks on the calls, which assume essentially every high register is used.


================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:617
+        assert(MI.getOpcode() == AMDGPU::SI_CALL);
+        // Pseudo used just to encode the underlying global. Is there a better
+        // way to track this?
----------------
rampitec wrote:
> Add otherwise unused operand to s_swappc_b64 maybe?
The verifier doesn't accept that


https://reviews.llvm.org/D36004





More information about the llvm-commits mailing list