[PATCH] D36004: AMDGPU: Analyze callee resource usage in AsmPrinter
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 11:35:35 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:516
+
+ for (const MachineBasicBlock &MBB : MF) {
+ for (const MachineInstr &MI : MBB) {
----------------
Is this expensive loop really needed? Why cannot we rely on isPhysRegUsed?
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:609
+ if (IsSGPR) {
+ MaxSGPR = MaxUsed > MaxSGPR ? MaxUsed : MaxSGPR;
+ } else {
----------------
Some compilers will warn about absence of parenthesis around condition.
================
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?
----------------
Add otherwise unused operand to s_swappc_b64 maybe?
https://reviews.llvm.org/D36004
More information about the llvm-commits
mailing list