[PATCH] D78256: [llvm][NFC][CallSite] Removed CallSite from some implementation details.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 18:46:49 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:179
assert(LCS && RCS && "Must be calls or invokes!");
+ assert(isa<CallInst>(LCS) == isa<CallInst>(RCS) &&
----------------
If we use cast instead of dyn_cast we can drop this assert.
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:180
assert(LCS && RCS && "Must be calls or invokes!");
- assert(LCS.isCall() == RCS.isCall() && "Can't compare otherwise!");
+ assert(isa<CallInst>(LCS) == isa<CallInst>(RCS) &&
+ "Can't compare otherwise!");
----------------
Can we just compare getOpcode() here? That seems more obvious about what it’s doing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78256/new/
https://reviews.llvm.org/D78256
More information about the llvm-commits
mailing list