[PATCH] D95969: [WPD] Add an optional checking mode for debugging devirtualization

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 09:51:02 PST 2021


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1065
+        // devirtualized. The original call can be replaced with the trap.
+        CallBase &NewInst = versionCallSite(VCallSite.CB, TheFn);
+        NewInst.setCalledOperand(ConstantExpr::getBitCast(
----------------
is versioning necessary here? Can it just be:

if (target != direct_target)
  trap();
direct_target();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95969



More information about the llvm-commits mailing list