-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Prevent redundant casts and create fewer LLVM builders #105549
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
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 121fd41 with merge 90a90c32dad6513d8aa5922981091031aab10159... |
💔 Test failed - checks-actions |
if llvm::LLVMTypeOf(val) != dest_ty { | ||
llvm::LLVMBuildPointerCast(self.llbuilder, val, dest_ty, UNNAMED) | ||
} else { | ||
val | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't builder fold this at construction already https://github.com/rust-lang/llvm-project/blob/3dfd4d93fa013e1c0578d3ceac5c8f4ebba4b6ec/llvm/include/llvm/IR/IRBuilder.h#L1998-L2005?
The job Click to see the possible cause of the failure (guessed by this bot)
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
This seems like a nice improvement, but I'm probably not the best choice to review this. r? compiler |
☔ The latest upstream changes (presumably #109862) made this pull request unmergeable. Please resolve the merge conflicts. |
Prevents redundant bit/pointer/int casts being codegen'd by LLVM and reduces the number of LLVM builders that are created through the course of code generation