[PATCH] D89623: [MemCpyOpt] Move GEP during call slot optimization

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 17 07:01:24 PDT 2020


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:920
+    return true;
+  };
+  if (!DominatesCall(cpyDest)) {
----------------
I'm wondering if it would make sense to extend the `dominates()` API to accept a Value* instead of Instruction* as first argument. Handling "arguments, constants and globals dominate everything" seems like something the DominatorTree API should do, not the caller.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89623



More information about the llvm-commits mailing list