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

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 13:01:58 PST 2021


pcc accepted this revision.
pcc added a comment.

LGTM



================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1062
+      Value *Callee = TheFn;
+      if (CB.getCalledOperand()->getType() != TheFn->getType())
+        Callee =
----------------
No need for an if here, just do the bitcast and it will constant fold away if the types are the same.


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