[PATCH] D88805: [MemCpyOpt] Use dereferenceable pointer helper
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 14:28:21 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:854
// that what would be the new parameter dominates the callsite.
+ // TODO: Support moving instructions like GEPs upwards.
if (Instruction *cpyDestInst = dyn_cast<Instruction>(cpyDest))
----------------
nikic wrote:
> By the way, is there any existing API for this? That is, to move an instruction and its dependencies up, for trivially speculatable cases. I've seen CodeMoverUtils, but that's a very big hammer (even requiring PDT).
I can't think of anything off the top of my head. You wouldn't usually want to speculate an arbitrary number of instructions without some cost model, anyway, and then it gets really complicated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88805/new/
https://reviews.llvm.org/D88805
More information about the llvm-commits
mailing list