[PATCH] D106930: [ThinLTO] Disallow importing for functions with indir branch to block address

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 09:19:03 PDT 2021


wmi added inline comments.


================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:275
+      for (User *U : BlockAddress::get(const_cast<BasicBlock *>(&BB))->users())
+        if (!isa<CallBrInst>(*U)) {
+          HasIndirBranchToBlockAddress = true;
----------------
wenlei wrote:
> This logic is from InlineCost.cpp, but I'm not sure in what case do we have an indirect call to a block label? 
Here is the only usage of CallBrInst in clang: https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/CGStmt.cpp#L2282, and it is used for gcc inline asm extension: https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#GotoLabels 



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106930/new/

https://reviews.llvm.org/D106930



More information about the llvm-commits mailing list