Skip to content

[NFCI] Explicitly delete unused copy constructor and assign copy for VPInterleavedAccessInfo #134755

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
merged 2 commits into from
Apr 16, 2025

Conversation

calebwat
Copy link
Contributor

@calebwat calebwat commented Apr 7, 2025

VPInterleavedAccessInfo has a defined destructor freeing memory, but no explicitly defined copy constructor or copy assignment op. These are not used, so this patch marks them as deleted to avoid usage of the implicitly defined implementations.

VPInterleavedAccessInfo has a defined destructor freeing memory, but no explicitly defined copy constructor or copy assignment op. These are not used, so this patch marks them as deleted to avoid usage of the implicitly defined implementations.
@llvmbot
Copy link
Member

llvmbot commented Apr 7, 2025

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-vectorizers

Author: None (calebwat)

Changes

VPInterleavedAccessInfo has a defined destructor freeing memory, but no explicitly defined copy constructor or copy assignment op. These are not used, so this patch marks them as deleted to avoid usage of the implicitly defined implementations.


Full diff: https://github.com/llvm/llvm-project/pull/134755.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/VPlanSLP.h (+2)
diff --git a/llvm/lib/Transforms/Vectorize/VPlanSLP.h b/llvm/lib/Transforms/Vectorize/VPlanSLP.h
index 93f04e6e30a6f..7f123689170ad 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanSLP.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanSLP.h
@@ -48,6 +48,8 @@ class VPInterleavedAccessInfo {
 
 public:
   VPInterleavedAccessInfo(VPlan &Plan, InterleavedAccessInfo &IAI);
+  VPInterleavedAccessInfo(const VPInterleavedAccessInfo &) = delete;
+  VPInterleavedAccessInfo &operator=(const VPInterleavedAccessInfo &) = delete;
 
   ~VPInterleavedAccessInfo() {
     // Avoid releasing a pointer twice.

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

VPInterleavedAccessInfo should not be copied

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@calebwat
Copy link
Contributor Author

Ping for merge, if all looks good.

@fhahn fhahn merged commit 05aa989 into llvm:main Apr 16, 2025
11 checks passed
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
…VPInterleavedAccessInfo (llvm#134755)

VPInterleavedAccessInfo has a defined destructor freeing memory, but no
explicitly defined copy constructor or copy assignment op. These are not
used, so this patch marks them as deleted to avoid usage of the
implicitly defined implementations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants