Skip to content
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

[Support] Recycler: Implement move constructor #120555

Conversation

optimisan
Copy link
Contributor

@optimisan optimisan commented Dec 19, 2024

Discovered missing while running RAGreedy through the NPM which relies on moving analyses to the cache.

Copy link
Contributor Author

optimisan commented Dec 19, 2024

@llvmbot
Copy link
Member

llvmbot commented Dec 19, 2024

@llvm/pr-subscribers-llvm-support

Author: Akshat Oke (optimisan)

Changes

...discovered missing while running RAGreedy through the NPM which relies on moving analyses to the cache.


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

1 Files Affected:

  • (modified) llvm/include/llvm/Support/Recycler.h (+4)
diff --git a/llvm/include/llvm/Support/Recycler.h b/llvm/include/llvm/Support/Recycler.h
index bbd9ae321ae30c..693c6559ff2fdc 100644
--- a/llvm/include/llvm/Support/Recycler.h
+++ b/llvm/include/llvm/Support/Recycler.h
@@ -60,6 +60,10 @@ class Recycler {
     // clear() before deleting the Recycler.
     assert(!FreeList && "Non-empty recycler deleted!");
   }
+  Recycler(const Recycler &) = delete;
+  Recycler(Recycler &&Other)
+      : FreeList(std::exchange(Other.FreeList, nullptr)) {}
+  Recycler() = default;
 
   /// clear - Release all the tracked allocations to the allocator. The
   /// recycler must be free of any tracked allocations before being

@optimisan optimisan requested a review from dwblaikie December 19, 2024 14:35
@dwblaikie
Copy link
Collaborator

Unit test coverage?

@optimisan optimisan force-pushed the users/Akshat-Oke/12-16-_newpm_codegen_record_parameterized_machine_pass_names_to_pic branch from d9acb7c to c67c0ae Compare January 1, 2025 06:39
@optimisan optimisan force-pushed the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch from 982ad41 to df8e573 Compare January 1, 2025 06:39
@optimisan optimisan changed the base branch from users/Akshat-Oke/12-16-_newpm_codegen_record_parameterized_machine_pass_names_to_pic to users/Akshat-Oke/01-01-_support_recycler_enforce_minimum_allocation_size January 1, 2025 06:39
@optimisan optimisan force-pushed the users/Akshat-Oke/01-01-_support_recycler_enforce_minimum_allocation_size branch from 600fd4c to 4496358 Compare January 1, 2025 06:54
@optimisan optimisan force-pushed the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch from df8e573 to 30e38c2 Compare January 1, 2025 06:54
@optimisan optimisan force-pushed the users/Akshat-Oke/01-01-_support_recycler_enforce_minimum_allocation_size branch from 4496358 to ac8a44c Compare January 1, 2025 07:06
@optimisan optimisan force-pushed the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch from 30e38c2 to f5baddf Compare January 1, 2025 07:07
@optimisan optimisan force-pushed the users/Akshat-Oke/01-01-_support_recycler_enforce_minimum_allocation_size branch from ac8a44c to 5e6aefd Compare January 1, 2025 11:43
@optimisan optimisan force-pushed the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch from f5baddf to af2bec8 Compare January 1, 2025 11:43
Base automatically changed from users/Akshat-Oke/01-01-_support_recycler_enforce_minimum_allocation_size to main January 6, 2025 06:23
@optimisan optimisan force-pushed the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch from af2bec8 to e6fab53 Compare January 7, 2025 06:17
Copy link
Contributor Author

optimisan commented Jan 7, 2025

Merge activity

  • Jan 7, 5:16 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 7, 5:17 AM EST: A user merged this pull request with Graphite.

@optimisan optimisan merged commit bc51a2e into main Jan 7, 2025
6 of 8 checks passed
@optimisan optimisan deleted the users/Akshat-Oke/12-19-_support_recycler_implement_move_constructor branch January 7, 2025 10:17
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 7, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vls running on linaro-g3-02 while building llvm at step 4 "clean stage 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/4576

Here is the relevant piece of the build log for the reference
Step 4 (clean stage 1) failure: clean (failure)
command timed out: 1200 seconds without output running [b'rm', b'-rf', b'stage1'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1209.003758
Step 6 (build stage 1) failure: 'ninja' (failure)
...
[8313/8797] Building CXX object tools/llvm-jitlink/llvm-jitlink-executor/CMakeFiles/llvm-jitlink-executor.dir/llvm-jitlink-executor.cpp.o
[8314/8797] Building CXX object tools/llvm-link/CMakeFiles/llvm-link.dir/llvm-link.cpp.o
[8315/8797] Building CXX object tools/llvm-mc/CMakeFiles/llvm-mc.dir/llvm-mc.cpp.o
[8316/8797] Building CXX object tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/llvm-dwp-driver.cpp.o
[8317/8797] Linking CXX static library lib/libFIRTestAnalysis.a
[8318/8797] Building CXX object tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/llvm-dwp.cpp.o
[8319/8797] Building CXX object tools/llvm-ifs/CMakeFiles/llvm-ifs.dir/ErrorCollector.cpp.o
[8320/8797] Building CXX object tools/llvm-gsymutil/CMakeFiles/llvm-gsymutil.dir/llvm-gsymutil-driver.cpp.o
[8321/8797] Building CXX object tools/llvm-ifs/CMakeFiles/llvm-ifs.dir/llvm-ifs-driver.cpp.o
[8322/8797] Building CXX object tools/llvm-libtool-darwin/CMakeFiles/llvm-libtool-darwin.dir/llvm-libtool-darwin-driver.cpp.o
command timed out: 1200 seconds without output running [b'ninja'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=3591.435876

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.

5 participants