[PATCH] D132084: [Cloning] handle blockaddress array clone in the same module
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 14:56:22 PDT 2022
efriedma added a comment.
> Thanks, I see your point now. The issue is indeed not solvable in general for the reason you mentioned, but for certain commonly used patterns like global blockaddress array, it is legal to clone since each element of such array could not be shared by functions.
You'd have to prove that values loaded from the array don't escape the function, which seems difficult to prove in cases where I'd expect to see blockaddress used.
> the current situation of silently creating broken IR when cloning blockaddress is not ideal.
I'm not sure what invariant we can enforce here. Maybe something related to the CloneFunctionChangeType?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132084/new/
https://reviews.llvm.org/D132084
More information about the llvm-commits
mailing list