This is an archive of the discontinued LLVM Phabricator instance.

IPRA: Don't assume called function is first call operand
ClosedPublic

Authored by arsenm on Aug 14 2017, 9:52 AM.

Details

Reviewers
MatzeB
qcolombet
Summary

Fixes not finding the called global for AMDGPU
call pseudoinstructions. The call instruction can't
directly refer to a global, so we use a pseudo mirroring
the actual instruction's operands with an extra operand
appended to refer to the function.

Diff Detail

Event Timeline

arsenm created this revision.Aug 14 2017, 9:52 AM
arsenm updated this revision to Diff 111017.Aug 14 2017, 9:53 AM

Use a dyn_cast. It might be possible to see a call to something that isn't directly a Function

arsenm updated this revision to Diff 111032.Aug 14 2017, 10:35 AM

Add tests

MatzeB edited edge metadata.Aug 15 2017, 12:35 PM

Looks like an incomplete patch (I only see a changed testcase).

MatzeB accepted this revision.Aug 15 2017, 12:39 PM

I guess the sourcecode changes are in the earlier revision, they LGTM (I'd tend to remove the TODO comment).

This revision is now accepted and ready to land.Aug 15 2017, 12:39 PM
arsenm closed this revision.Aug 24 2017, 12:56 AM

r311637