1. 20 Oct, 2023 3 commits
  2. 19 Oct, 2023 1 commit
    • Optimize prefetch codegen. · 03786143
      Currently we use "r" constraint to pass prefetched address.
      This forces the compiler to actually put it into a register.
      As the result some uses look as:
      
       16bfb7c:	48 01 cf             	add    %rcx,%rdi
       16bfb7f:	0f 0d 0f             	prefetchw (%rdi)
      --
       16bfccf:	48 83 c1 60          	add    $0x60,%rcx
       16bfcd3:	0f 0d 09             	prefetchw (%rcx)
      
      Use "m" constraint instead. It's more relaxed and requires
      to just materialize the address in some form using whatever
      addressing modes the target supports (e.g. x86 off(base, index, scale)).
      With the change the same code becomes:
      
       16bfb7c:	0f 0d 0c 39          	prefetchw (%rcx,%rdi,1)
      --
       16bfccf:	0f 0d 49 60          	prefetchw 0x60(%rcx)
      
      PiperOrigin-RevId: 574723975
      Change-Id: Id0c8645f8c702d1842685343901da321f6513156
      Dmitry Vyukov committed
  3. 18 Oct, 2023 1 commit
  4. 17 Oct, 2023 2 commits
    • Rollback: Add sanitizer mode checks that element constructors/destructors don't… · 7676c565
      Rollback: Add sanitizer mode checks that element constructors/destructors don't make reentrant calls to raw_hash_set member functions.
      
      PiperOrigin-RevId: 574232718
      Change-Id: I8ef25fec00b76ee5fb9424e7614ca55edd6ba81b
      Evan Brown committed
    • PR #1546: CMake: Enable CMP0074 so that GTest_ROOT can be specified · b87875aa
      Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1546
      
      I am building Abseil with tests enabled and an external GTest build, i.e.
      ```
      -DABSL_BUILD_TESTING=ON
      -DABSL_USE_EXTERNAL_GOOGLETEST=ON
      -DABSL_FIND_GOOGLETEST=ON
      -DGTest_ROOT=/path/to/googletest/1.14.0
      ```
      
      However, CMake (3.20.2) configuration yielded this result:
      ```
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - found
      -- Found Threads: TRUE
      CMake Warning (dev) at CMakeLists.txt:150 (find_package):
        Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
        Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
        command to set the policy and suppress this warning.
      
        CMake variable GTest_ROOT is set to:
      
          /path/to/googletest/1.14.0
      
        For compatibility, CMake is ignoring the variable.
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR
        GTEST_MAIN_LIBRARY)
      Call Stack (most recent call first):
        /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
        /usr/share/cmake/Modules/FindGTest.cmake:255 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
        CMakeLists.txt:150 (find_package)
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/abseil-build/CMakeFiles/CMakeOutput.log".
      See also "/tmp/abseil-build/CMakeFiles/CMakeError.log".
      ```
      
      This PR sets `CMP0074=NEW` so that the GTest install location can be specified via `GTest_ROOT`.
      Merge 4e4f035affd9b8af739634afdf9c2e80d14c2391 into 2a18ba75
      
      Merging this change closes #1546
      
      COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1546 from iskunk:feature/fix-gtest-root 4e4f035affd9b8af739634afdf9c2e80d14c2391
      PiperOrigin-RevId: 574159856
      Change-Id: Ifc796500c3a6403d28a027375116437bc743205a
      Daniel Richard G committed
  5. 16 Oct, 2023 2 commits
  6. 12 Oct, 2023 5 commits
  7. 11 Oct, 2023 3 commits
  8. 10 Oct, 2023 1 commit
    • Bazel: Support layering_check and parse_headers · 143e9837
      The layering_check feature ensures that rules that include a header
      explicitly depend on a rule that exports that header. Compiler support
      is required, and currently only Clang 16+ supports diagnoses
      layering_check failures.
      
      The parse_headers feature ensures headers are self-contained by
      compiling them with -fsyntax-only on supported compilers.
      
      PiperOrigin-RevId: 572350144
      Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
      Derek Mauro committed
  9. 09 Oct, 2023 1 commit
  10. 07 Oct, 2023 1 commit
  11. 06 Oct, 2023 5 commits
  12. 05 Oct, 2023 1 commit
  13. 04 Oct, 2023 1 commit
  14. 03 Oct, 2023 3 commits
    • Use ABSL_RAW_LOG and ABSL_PREDICT_* for all debug checks in swisstable including… · d26b6250
      Use ABSL_RAW_LOG and ABSL_PREDICT_* for all debug checks in swisstable including sanitizer mode checks.
      
      Sanitizer mode can be used for canaries so performance is still relevant. This change also makes the code more uniform.
      
      PiperOrigin-RevId: 570438923
      Change-Id: I62859160eb9323e6420680a43fd23e97e8a62389
      Evan Brown committed
    • Refactor swisstable copy/move assignment to fix issues with allocator… · 22dc7911
      Refactor swisstable copy/move assignment to fix issues with allocator propagation and improve performance.
      
      Correctness:
      - We use swap to implement copy assignment and move assignment, which means that allocator propagation in copy/move assignment depends on `propagate_on_container_swap` in addition to `propagate_on_container_copy_assignment`/`propagate_on_container_move_assignment`.
      - In swap, if `propagate_on_container_swap` is `false` and `get_allocator() != other.get_allocator()`, the behavior is undefined (https://en.cppreference.com/w/cpp/container/unordered_set/swap) - we should assert that this UB case isn't happening. For this reason, we also delete the NoPropagateOn_Swap test case in raw_hash_set_allocator_test.
      
      Performance:
      - Don't rely on swap so we don't have to do unnecessary copying into the moved-from sets.
      - Don't use temp sets in move assignment.
      - Default the move constructor of CommonFields.
      - Avoid using exchange in raw_hash_set move constructor.
      - In `raw_hash_set(raw_hash_set&& that, const allocator_type& a)` with unequal allocators and in move assignment with non-propagating unequal allocators, move set keys instead of copying them.
      PiperOrigin-RevId: 570419290
      Change-Id: I499e54f17d9cb0b0836601f5c06187d1f269a5b8
      Evan Brown committed
    • Update a dead link. · 74a8f6fa
      This cl/ updates the link provided in the comment to point to a valid website. Currently the link points to https://screenshot.googleplex.com/BZhRp6mNJAtjMmz which is now a software company landing page.
      
      PiperOrigin-RevId: 570384723
      Change-Id: Ib6d17851046125957e092b59d845ddb7ecb1f7b7
      Abseil Team committed
  15. 02 Oct, 2023 2 commits
  16. 27 Sep, 2023 3 commits
  17. 26 Sep, 2023 5 commits