[PATCH] D45116: Don't inline branch funnels

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 19:04:32 PDT 2018


pcc added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:1970
+        if (const Function *F = CI->getCalledFunction())
+          if (CI->isMustTailCall() && F->isIntrinsic())
+            return llvm::InlineCost::getNever();
----------------
Move this analysis to `CallAnalyzer::visitCallSite`.


================
Comment at: llvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll:6
+
+; RUN: opt -wholeprogramdevirt -wholeprogramdevirt-summary-action=export -wholeprogramdevirt-read-summary=%S/Inputs/export.yaml -wholeprogramdevirt-write-summary=%t  -O3 -S -o - %s | FileCheck --check-prefixes=CHECK %s
+
----------------
I would write this as a direct test of the inliner rather than the `-O3` pipeline.


Repository:
  rL LLVM

https://reviews.llvm.org/D45116





More information about the llvm-commits mailing list