[PATCH] D145293: [GlobalOpt] Don't replace the aliasee if it has other references.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 17:32:17 PST 2023
MaskRay added a comment.
How does rustc use `llvm.compiler.used` or `llvm.uses`?
> As long as aliasee has @llvm.used or @llvm.compiler.used references, we cannot do the related replace or delete operations. Even if it is a Local Linkage, we cannot infer if there is no other use for it, such as asm or other future added cases.
This is vague. I think we need tests to demonstrate that it is unsafe to replace. If you can write an inline asm expression or module-level asm to demonstrate the issue, change the test to reflect the case.
Do we have a use case with an internal alias and an aliasee which are not in `llvm.used`/`llvm.compiler.used`? If no, we should add such a test.
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