[all-commits] [llvm/llvm-project] 3e3754: [MemCpyOpt] Move GEP during call slot optimization
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Oct 22 11:41:20 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3e37543111f40c3fa2430a80eb0293ae3b814dd3
https://github.com/llvm/llvm-project/commit/3e37543111f40c3fa2430a80eb0293ae3b814dd3
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-10-22 (Thu, 22 Oct 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
M llvm/test/Transforms/MemCpyOpt/callslot.ll
Log Message:
-----------
[MemCpyOpt] Move GEP during call slot optimization
When performing a call slot optimization to a GEP destination, it
will currently usually fail, because the GEP is directly before the
memcpy and as such does not dominate the call. We should move it
above the call if that satisfies the domination requirement.
I think that a constant-index GEP is the only useful thing to move
here, as otherwise isDereferenceablePointer couldn't look through
it anyway. As such I'm not trying to generalize this further.
Differential Revision: https://reviews.llvm.org/D89623
More information about the All-commits
mailing list