)]}'
{
  "commit": "964041ea2662fb60799554fa28488577b71e69ab",
  "tree": "ca320d1881f7d104ffc0c49b2794bdfaed071327",
  "parents": [
    "c3d4bbb187f90f8610483f2d2c51d26c2ed062f5"
  ],
  "author": {
    "name": "Evan Brown",
    "email": "ezb@google.com",
    "time": "Tue Oct 20 15:13:02 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 20 15:14:17 2026 -0700"
  },
  "message": "Add ABSL_SWISSTABLE_ASSUME_SEPARATE_STORAGE and use it in raw_hash_set::control().\n\nApparently, the manual assume we had with pointer values wasn\u0027t doing anything (we previously thought it was valuable but apparently the original change\u0027s codegen effects were side effects of e.g. calling `NumControlBytes(capacity())`).\n\nBenefits of the new `ABSL_SWISSTABLE_ASSUME_SEPARATE_STORAGE(ctrl, this)` in `raw_hash_set::control()`:\n\n* Unlike the previous `reinterpret_cast\u003cuintptr_t\u003e` range comparison inside `ABSL_ASSUME` (which LLVM\u0027s `BasicAA` ignores), `__builtin_assume_separate_storage(ctrl, this)` lowers to an `@llvm.assume` `\"separate_storage\"` operand bundle that `BasicAA` directly uses to prove that pointers derived from `ctrl` (including `slot_array` and iterator slot pointers on the non-SOO path) cannot alias `*this` (or any enclosing object containing the table).\n\n* When a caller mutates an element via an iterator returned by `find()` or `begin()` (e.g. `*it \u003d v` or `it-\u003esecond \u003d v`), the compiler can now prove that the store to the slot does not clobber `CommonFields` metadata (`size`, `capacity`, `seed` in `0(%rdi)`), eliminating redundant reloads of `CommonFields` (and freeing `this` earlier to reduce register pressure) across subsequent `size()`, `capacity()`, or `find()` operations.\n\nBenefits of removing the previous assume from `CommonFields::control()` on `raw_hash_set_benchmark` (`--config\u003dbenchmark --cpu\u003dhaswell`, `llvm-mca -mcpu\u003dznver3`):\n\n* `raw_hash_set::find`: Removing `NumControlBytes(capacity())` from `CommonFields::control()` allows `prefetcht2` (`prefetch_heap_block()`) to be scheduled immediately after loading `ctrl` (`movq 8(%rdi), %rax`), ahead of the capacity mask setup (`movq $-1, %r8; shlxq %rdx, %r8, %rcx`).\n\n* Under `llvm-mca -mcpu\u003dznver3 -iterations\u003d1`, this promotes `prefetcht2` from the second dispatch group (cycle 1) into the first dispatch group (cycle 0) while leaving static L1-hit latency unchanged (36 cycles for `CodegenAbslRawHashSetInt64Find`, 37 cycles for `CodegenAbslRawHashSetInt64FindNeEnd`, 143 cycles for `StringTable::find`), and avoids a stack spill in `DescriptorByNameHash` `raw_hash_set::find\u003cstring_view\u003e` (133 → 131 cycles, RThroughput 29.7 → 29.3).\n\n* `raw_hash_set.cc` (`CommonFields`): Removing `reinterpret_cast\u003cuintptr_t\u003e(this)` from `CommonFields::control()` allows LLVM argument promotion on `ReportInsertMissToInfoz` (11 → 8 instructions, 15 → 10 cycles at `-iterations\u003d1`) and slightly reduces instruction counts in `ResizeAllocatedTableWithSeedChange` (377 → 374 instructions, 244 → 243 cycles) and `EraseMetaOnlyLarge` (78 → 77 instructions, RThroughput 13.7 → 13.3).\n\nPiperOrigin-RevId: 1003430109\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4d76862e95af922cbcf48604c54014cdf4a7c404",
      "old_mode": 33188,
      "old_path": "absl/container/internal/raw_hash_set.h",
      "new_id": "ad7965243686e1f38d9b4a3df1bd5a866986129f",
      "new_mode": 33188,
      "new_path": "absl/container/internal/raw_hash_set.h"
    }
  ]
}
