[PATCH] D78414: [llvm][NFC][CallSite] Remove CallSite from ProfileSummary
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 12:22:28 PDT 2020
mtrofin marked 2 inline comments as done.
mtrofin 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();
----------------
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.
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