[PATCH] D48307: [Inliner] Try to inline if some blocks in the callee have address taken, but not used in a meaningful.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 13 11:50:12 PDT 2018
efriedma added inline comments.
================
Comment at: include/llvm/IR/BasicBlock.h:391
+ /// way, i.e. non-dead way.
+ bool hasAddressTakenAndUsed();
+
----------------
Could we just replace hasAddressTaken() with this function? I don't think anything calling hasAddressTaken() actually cares if there are dead uses.
================
Comment at: lib/IR/BasicBlock.cpp:446
+ BlockAddress *BA = BlockAddress::get(this);
+ BA->removeDeadConstantUsers();
+ return !BA->use_empty();
----------------
Please use isConstantUsed instead; mutating the IR in a function named "hasAddressTakenAndUsed" is confusing.
Repository:
rL LLVM
https://reviews.llvm.org/D48307
More information about the llvm-commits
mailing list