[PATCH] D145293: [GlobalOpt] Don't replace the aliasee if it has other references.
DianQK via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 06:09:01 PST 2023
DianQK added a comment.
In D145293#4176933 <https://reviews.llvm.org/D145293#4176933>, @pcc wrote:
> To be honest, I would rather we look at removing `OptimizeGlobalAliases` altogether. As I explained in D65118 <https://reviews.llvm.org/D65118>, these kinds of trivial alias "optimizations" on their own can be more harmful than helpful.
Due to my limited skills, I can't evaluate the benefits of `OptimizeGlobalAliases`.
As you said, I find optimizing this kind of problem a bit complicated, especially when it comes to different linkage handling.
How about adding some additional assertions when removing aliases? If possible, this one that at least problems like could be detected much earlier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145293/new/
https://reviews.llvm.org/D145293
More information about the llvm-commits
mailing list