-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Due to historic accidents and severe cases of laziness, all allocations created by constant evaluation are named byte_str
. This naming does not improve the debuggability of LLVM-IR and is rarely correct.
It would be great if the name given to the allocation would either be something derived from the context of the allocation (like the name of the static/constant/function that the allocation belongs to), or in case such information cannot be derived, either produce no name or just data
as a fallback.
Proposed order of steps:
- rename
byte_str
todata
and adjust tests accordingly - Pass down
None::<String>
inpub fn from_const(bx: &Builder<'a, 'tcx>, pub fn primval_to_llvm(cx: &CodegenCx, - Replace those
None::<String>
with an actual value where such information is available.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.