[PATCH] D78414: [llvm][NFC][CallSite] Remove CallSite from ProfileSummary
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 15:05:42 PDT 2020
dblaikie 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();
----------------
craig.topper wrote:
> 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.
That was the notion, yeah - no big deal though & sorry for the lack of clarity.
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