[PATCH] D87132: [Partial Inliner] Compute intrinsic cost through TTI

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 12:23:34 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/PartialInlining.cpp:875
 
+    if (isa<IntrinsicInst>(&I)) {
+      auto *II = cast<IntrinsicInst>(&I);
----------------
you can use `if (auto *II = dyn_cast<IntrinsicInst>(&I))`


================
Comment at: llvm/lib/Transforms/IPO/PartialInlining.cpp:881
+      unsigned Op = 0, Opc = II->getNumArgOperands();
+      for (; Op != Opc; ++Op)
+        Tys.push_back(II->getArgOperand(Op)->getType());
----------------
Is it possible to just use `II->args()`?


================
Comment at: llvm/test/Transforms/PartialInlining/intrinsic-call-cost.ll:1
+; Test case is expected to get through with out assert fail.
+;   assert(OutlinedFunctionCost >= Cloner.OutlinedRegionCost &&
----------------
Can you also add a reference to the bug in the comment here?

And the file mode seems a bit odd. The file does not need to be executable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87132



More information about the llvm-commits mailing list