[PATCH] D45023: [GlobalOpt] Implement static evaluation of memcpy intrinsics for const i8 arrays.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 29 06:14:00 PDT 2018
aemerson created this revision.
aemerson added reviewers: Gerolf, ab.
The evaluation of static constructors would fail in the presence of memcpy intrinsics, such as the following code:
struct c {
char d[3];
int e;
};
int var = 42;
c f = {"ab", var};
however we can still evaluate the memcpy as it's copying from a constant i8 array.
rdar://37690940
Repository:
rL LLVM
https://reviews.llvm.org/D45023
Files:
lib/Transforms/Utils/Evaluator.cpp
test/Transforms/GlobalOpt/ctor-eval-memcpy.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45023.140218.patch
Type: text/x-patch
Size: 7670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180329/df7aa23b/attachment.bin>
More information about the llvm-commits
mailing list