[all-commits] [llvm/llvm-project] f5446b: [MemCpyOpt] Allow variable lengths in memcpy optim...
Olle Fredriksson via All-commits
all-commits at lists.llvm.org
Wed Apr 21 14:24:08 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f5446b769a7929806f72256fccd4826d66502e59
https://github.com/llvm/llvm-project/commit/f5446b769a7929806f72256fccd4826d66502e59
Author: Olle Fredriksson <fredriksson.olle at gmail.com>
Date: 2021-04-21 (Wed, 21 Apr 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
A llvm/test/Transforms/MemCpyOpt/variable-sized-memcpy-memcpy.ll
A llvm/test/Transforms/MemCpyOpt/variable-sized-memcpy-uninit.ll
A llvm/test/Transforms/MemCpyOpt/variable-sized-memset-memcpy.ll
Log Message:
-----------
[MemCpyOpt] Allow variable lengths in memcpy optimizer
This makes the memcpy-memcpy and memcpy-memset optimizations work for
variable sizes as long as they are equal, relaxing the old restriction
that they are constant integers. If they're not equal, the old
requirement that they are constant integers with certain size
restrictions is used.
The implementation works by pushing the length tests further down in the
code, which reveals some places where it's enough that the lengths are
equal (but not necessarily constant).
Differential Revision: https://reviews.llvm.org/D100870
More information about the All-commits
mailing list