This is an archive of the discontinued LLVM Phabricator instance.

[CallSite Removal] a CallBase is never an IndirectCall for isInlineAsm
ClosedPublic

Authored by nickdesaulniers on Apr 6 2020, 3:27 PM.

Details

Summary

Thanks to Bill Wendling (void) for the report and steps to reproduce. It looks
like this was missed during r350508's cleanup of the CallSite split into
CallBase, CallInst, and CallBrInst.

This was exposed by running pgo on a callbr, which was creating a ptrtoint to
the inline asm thinking it was an indirect call. The relevant callchain looks
like:

IndirectCallPromotionPlugin::run()
-> PGOIndirectCallVisitor::findIndirectCalls()
  -> PGOIndirectCallVisitor::visitCallBase()
    -> CallBase::isIndirectCall()

Diff Detail

Event Timeline

nickdesaulniers created this revision.Apr 6 2020, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 3:27 PM
nickdesaulniers edited the summary of this revision. (Show Details)Apr 6 2020, 3:28 PM
void accepted this revision.Apr 6 2020, 3:29 PM
This revision is now accepted and ready to land.Apr 6 2020, 3:29 PM
nickdesaulniers planned changes to this revision.Apr 6 2020, 3:29 PM
nickdesaulniers added inline comments.
llvm/lib/IR/Instructions.cpp
270

eh, could simplify this more, will do.

  • simplify function
This revision is now accepted and ready to land.Apr 6 2020, 3:31 PM
nickdesaulniers marked an inline comment as done.Apr 6 2020, 3:32 PM
nickdesaulniers edited the summary of this revision. (Show Details)
  • touch fewer lines as per Bill
  • actually compile test the change...
This revision was automatically updated to reflect the committed changes.