Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternalizePass should consider built-in functions. #65965

Closed
DianQK opened this issue Sep 11, 2023 · 1 comment
Closed

InternalizePass should consider built-in functions. #65965

DianQK opened this issue Sep 11, 2023 · 1 comment
Assignees
Labels
llvm:optimizations miscompilation wontfix Issue is real, but we can't or won't fix it. Not invalid

Comments

@DianQK
Copy link
Member

DianQK commented Sep 11, 2023

We should preserve built-in functions when running InternalizePass.

Similar to

AlwaysPreserved.insert("__stack_chk_fail");
if (Triple(M.getTargetTriple()).isOSAIX())
AlwaysPreserved.insert("__ssp_canary_word");
else
AlwaysPreserved.insert("__stack_chk_guard");
and
static const char *PreservedSymbols[] = {
#define HANDLE_LIBCALL(code, name) name,
#include "llvm/IR/RuntimeLibcalls.def"
#undef HANDLE_LIBCALL
// There are global variables, so put it here instead of in
// RuntimeLibcalls.def.
// TODO: Are there similar such variables?
"__ssp_canary_word",
"__stack_chk_guard",
};
.

Related issue: rust-lang/rust#113923.

@DianQK
Copy link
Member Author

DianQK commented Nov 2, 2023

We can choose to have the compiler collect these symbols.

@DianQK DianQK closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@EugeneZelenko EugeneZelenko added the wontfix Issue is real, but we can't or won't fix it. Not invalid label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:optimizations miscompilation wontfix Issue is real, but we can't or won't fix it. Not invalid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants