This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix not accounting for tail call resource usage
ClosedPublic

Authored by arsenm on Sep 1 2017, 6:16 PM.

Details

Reviewers
rampitec
Summary

If the only call in a function is a tail call, the
function isn't considered to have a call since it's a
type of return.

Diff Detail

Event Timeline

arsenm created this revision.Sep 1 2017, 6:16 PM
rampitec added inline comments.Sep 4 2017, 10:32 AM
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
503–504

If it does not have calls it may not have tail calls. Am I missing something?

arsenm added inline comments.Sep 5 2017, 9:57 AM
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
503–504

A tail call is not considered a call of hasCalls's purposes. If there is only a tail call it reports false.

rampitec added inline comments.Sep 5 2017, 10:07 AM
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
503–504

That is quite unexpected. Please add a comment at least.

arsenm updated this revision to Diff 113883.Sep 5 2017, 10:45 AM

Add comment

This revision is now accepted and ready to land.Sep 5 2017, 10:46 AM
arsenm closed this revision.Sep 5 2017, 11:38 AM

r312561