This is an archive of the discontinued LLVM Phabricator instance.

[CallSiteInfo] Use the isCandidateForCallSiteEntry() when update the cs info
ClosedPublic

Authored by djtodoro on Feb 6 2020, 4:36 AM.

Details

Summary

Use the isCandidateForCallSiteEntry().
This should mostly be an NFC, but there are some parts ensuring the moveCallSiteInfo and copyCallSiteInfo operate with call site entry candidates (both Src and Dest should be the call site entry candidates).

Diff Detail

Event Timeline

djtodoro created this revision.Feb 6 2020, 4:36 AM
vsk accepted this revision.Feb 6 2020, 1:29 PM

LGTM, pending resolution of https://reviews.llvm.org/D74121 vs. https://reviews.llvm.org/D74159. (I believe this can easily be rebased on top of either patch.)

This revision is now accepted and ready to land.Feb 6 2020, 1:29 PM
vsk added a comment.Feb 7 2020, 10:39 AM

Test coverage for this is dependent on https://reviews.llvm.org/D73534, AIUI, but this looks safe to land first.

vsk accepted this revision.Feb 7 2020, 10:39 AM
This revision was automatically updated to reflect the committed changes.
chill added a subscriber: chill.May 1 2020, 4:19 AM
chill added inline comments.
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
1210

Isn't this check redundant, give we know we're replacing a TCRETURNxxx ?

1445

Likewise, isn't this redundant, given we have TPsoft/tTPsoft, both of which have isCall = 1?

djtodoro marked an inline comment as done.May 1 2020, 8:26 AM
djtodoro added inline comments.
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
1445

I think it is not, since we do not consider all posible calls as ‘call site entry candidates’. The call site info is used for debug entry values feature only (for now).

djtodoro marked an inline comment as done.May 1 2020, 8:38 AM
djtodoro added inline comments.
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
1445

Hmm...but if these are the only instructions we handle here, we can avoid these checks actually... And it is safe, since we have the assertions within ‘*callSiteInfo’ ensuring we call it only in the case of call site entry candidates.