[PATCH] D98884: [IR] Ignore bitcasts of function pointers which are only used as callees in callbase instruction
Madhur Amilkanthwar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 10:44:00 PDT 2021
madhur13490 added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:2167-2171
+ CallBase *CB = dyn_cast<CallBase>(U);
+ if (!CB) {
+ assert(false && "Expected CallBase");
+ return;
+ }
----------------
arsenm wrote:
> Just use cast<>
Are you suggesting to remove if (!CB) code block?
If so, how would it work in release builds? If cast<> fails, in debug builds, the assert would fire but in release builds, the code will try to access the member function because we don't have "return" statement. Does failure on cast<> return?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98884/new/
https://reviews.llvm.org/D98884
More information about the llvm-commits
mailing list