-
Notifications
You must be signed in to change notification settings - Fork 156
[CIR][CIRGen] Convert trivial copy constructor and assignment operator calls to memcpy #1677
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
[CIR][CIRGen] Convert trivial copy constructor and assignment operator calls to memcpy #1677
Conversation
- Modified the `forceCopy` function to demonstrate that the original member-by-member copy will be optimized out, resulting in a direct `cir.copy` operation.
…n in yield1 function
- Modified the expected output in derived-to-base.cpp to replace the copy constructor call with a direct cir.copy operation - Replace call operations with cir.copy for buffy and A class instances in vcall function
- Replaced the expected copy constructor call with a direct cir.copy operation in the test for exception handling. - Updated the LLVM output to reflect the new memcpy operation for trivial copy constructs, aligning with recent optimizations in CIR code generation.
- Update test1 to replace copy assignment with cir.copy operation
- Replaced expected copy constructor calls with direct cir.copy operations in the tests for both A and C structs. - Updated LLVM output to reflect the new memcpy operation, aligning with recent optimizations in CIR code generation for trivial copy constructs.
- Remove commented debug output from runOnOp function in LoweringPreparePass
Reimplement the replacement of trivial copy constructor / assignment to Key Features:
|
Note that
|
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.
LGTM modulo few nits
…nd streamline logic
Thanks for the review! |
No description provided.