[PATCH] D71308: [CallPromotionUtils] Add tryPromoteCall.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 12:25:57 PST 2020


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CallPromotionUtils.cpp:476
+      DL, VTableOffset, /* AllowNonInbounds */ false);
+  LoadInst *VTableLoad = dyn_cast<LoadInst>(VTableBasePtr);
+  if (!VTableLoad)
----------------
nit: VTableLoad --> VTablePointerLoad


================
Comment at: llvm/lib/Transforms/Utils/CallPromotionUtils.cpp:489
+  BasicBlock::iterator BBI(VTableLoad);
+  Value *VTable = FindAvailableLoadedValue(
+      VTableLoad, VTableLoad->getParent(), BBI, 0, nullptr, nullptr);
----------------
VTable --> VTablePtr


================
Comment at: llvm/lib/Transforms/Utils/CallPromotionUtils.cpp:508
+                                     *M);
+  if (!Ptr)
+    return false; // No constant (function) pointer found.
----------------
Is this possible?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71308





More information about the llvm-commits mailing list