-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CodeGen] LiveIntervalUnions::Array Implement move constructor #111357
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
Merged
optimisan
merged 1 commit into
main
from
users/Akshat-Oke/10-07-_codegen_liveintervalunions_array_implement_move_constructor
Oct 22, 2024
Merged
[CodeGen] LiveIntervalUnions::Array Implement move constructor #111357
optimisan
merged 1 commit into
main
from
users/Akshat-Oke/10-07-_codegen_liveintervalunions_array_implement_move_constructor
Oct 22, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Oct 7, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @optimisan and the rest of your teammates on |
@llvm/pr-subscribers-llvm-regalloc Author: Akshat Oke (Akshat-Oke) ChangesSolves the double free error. Full diff: https://github.com/llvm/llvm-project/pull/111357.diff 1 Files Affected:
diff --git a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h b/llvm/include/llvm/CodeGen/LiveIntervalUnion.h
index 81003455da4241..cc0f2a45bb182c 100644
--- a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h
+++ b/llvm/include/llvm/CodeGen/LiveIntervalUnion.h
@@ -176,6 +176,13 @@ class LiveIntervalUnion {
Array() = default;
~Array() { clear(); }
+ Array(Array &&Other) : Size(Other.Size), LIUs(Other.LIUs) {
+ Other.Size = 0;
+ Other.LIUs = nullptr;
+ }
+
+ Array(const Array &) = delete;
+
// Initialize the array to have Size entries.
// Reuse an existing allocation if the size matches.
void init(LiveIntervalUnion::Allocator&, unsigned Size);
|
arsenm
approved these changes
Oct 7, 2024
7b68d9f
to
a1925ae
Compare
15692bd
to
47bb192
Compare
a1925ae
to
ca68507
Compare
47bb192
to
dbc5187
Compare
ca68507
to
db91ca0
Compare
dbc5187
to
052c8b1
Compare
db91ca0
to
dee5a29
Compare
052c8b1
to
709adf0
Compare
dee5a29
to
2cd5b9b
Compare
709adf0
to
c2a3cdc
Compare
2cd5b9b
to
8dbbf81
Compare
c2a3cdc
to
c6b5910
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves the double free error.