[PATCH] D100717: [InstCombine] Transform memcpy to ptr load/stores if TBAA says so
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 18 02:09:22 PDT 2021
lebedev.ri added a comment.
In D100717#2697087 <https://reviews.llvm.org/D100717#2697087>, @nikic wrote:
> I'm uncomfortable with using TBAA for this purpose.
> The problem is that not all languages use TBAA, simply because that does not match their aliasing model.
> They shouldn't be penalized because TBAA information gets reused for an unrelated purpose.
How does this penalize them?
If they don't use TBAA then there simply won't be a TBAA info on that memcpy,
and we'll use the previous behavior of performing an integer op.
> Might it make sense to simply always use a pointer type here (assuming size matches of course)?
No. If it was a pointer we should treat it as such, if it was an integer we should treat it as such.
We shouldn't introduce bogus ptr<->int casts that weren't there originally.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100717/new/
https://reviews.llvm.org/D100717
More information about the llvm-commits
mailing list