[PATCH] D37411: AMDGPU: Fix not accounting for tail call resource usage

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 10:07:45 PDT 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:503
   // count easily.
-  if (!FrameInfo.hasCalls()) {
+  if (!FrameInfo.hasCalls() && !FrameInfo.hasTailCall()) {
     MCPhysReg HighestVGPRReg = AMDGPU::NoRegister;
----------------
arsenm wrote:
> rampitec wrote:
> > If it does not have calls it may not have tail calls. Am I missing something?
> A tail call is not considered a call of hasCalls's purposes. If there is only a tail call it reports false.
That is quite unexpected. Please add a comment at least.


https://reviews.llvm.org/D37411





More information about the llvm-commits mailing list