[PATCH] D78414: [llvm][NFC][CallSite] Remove CallSite from ProfileSummary
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 12:22:30 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/unittests/Analysis/ProfileSummaryInfoTest.cpp:230
- CallSite CS1(BB1->getFirstNonPHI());
+ CallBase &CS1 = *cast<CallBase>(BB1->getFirstNonPHI());
auto *CI2 = BB2->getFirstNonPHI();
----------------
mtrofin wrote:
> dblaikie wrote:
> > I think I'd tend to deref first, then cast (the earlier the constraint is applied the better/tools can diagnose the problem closer to the source), but don't mind either way.
> I see what you mean. Here, I wouldn't want to introduce another variable, and I think there's little ambiguity where a failure may happen, since cast would be the one to trigger it.
I think the suggestion was to put the * inside the parentheses instead outside the cast.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78414/new/
https://reviews.llvm.org/D78414
More information about the llvm-commits
mailing list