)]}'
{
  "commit": "c16cdee26b5febcaeb780b0e7d4f99bad266239c",
  "tree": "cb5ad9593797e11462164df3356cb42b442a53cf",
  "parents": [
    "82d323a0d4ecd9157db6b4a5f80683137fef4516"
  ],
  "author": {
    "name": "Vitaly Goldshteyn",
    "email": "goldvitaly@google.com",
    "time": "Tue Oct 20 16:43:49 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 20 16:45:25 2026 -0700"
  },
  "message": "Reorder operations in GrowToNextCapacityAndPrepareInsert to reduce binary size.\n\nIn `GrowToNextCapacityAndPrepareInsert`, reading `common` and `policy` fields before `policy.get_char_alloc(common)` and `AllocBackingArray` forces LLVM to spill those values to the stack across both calls. In addition, updating `common.inline_data_` in two separate stages—`set_capacity` and `set_blocked_element_count_to_zero` before `AllocBackingArray`, and `PrepareInsertCommon` and `ResetGrowthLeft(new_capacity, common.size(), common)` at the end of the function—requires loading and storing `common.inline_data_` twice and extracting `common.size()` twice.\n\nReorder the operations in `GrowToNextCapacityAndPrepareInsert` to shrink live ranges across calls and coalesce `common.inline_data_` updates:\n1. **Call `policy.get_char_alloc(common)` at function entry**: Because `get_char_alloc` is an indirect call taking a non-const `CommonFields\u0026`, calling it before reading `old_capacity` or `has_infoz` (when only the incoming arguments `common`, `policy`, and `new_hash` are live) eliminates pre-call stack spills and reduces the stack frame from `0x78` to `0x68` bytes.\n2. **Defer `old_*` loads until after `AllocBackingArray`**: `AllocBackingArray` receives `new_capacity` and `/*blocked_element_count\u003d*/0` explicitly and does not read `common.capacity()`, `common.control()`, or `common.blocked_element_count()`. Reading `old_ctrl`, `old_slots`, `old_blocked_element_count`, and `old_size` after `AllocBackingArray` avoids keeping them live across both calls.\n3. **Read `old_size` unconditionally and group all `common` updates together**: Grouping `set_capacity(new_capacity)`, `set_blocked_element_count_to_zero()`, `set_control(new_ctrl)`, `PrepareInsertCommon(common)`, and `ResetGrowthLeft(new_capacity, old_size + 1, common)` right after `AllocBackingArray` merges all four `common.inline_data_` bitfield updates into a single load-modify-store sequence, shares `old_size` between `policy.transfer_n` and `ResetGrowthLeft`, and allows LLVM to thread the `new_capacity \u003e 127` branch of `InitGrowthLeftNoDeleted` directly into the multi-group `else` branch.\n\nPiperOrigin-RevId: 1003492867\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b477e603befc35ea81e3db14732718b8e66dc1e3",
      "old_mode": 33188,
      "old_path": "absl/container/internal/raw_hash_set.cc",
      "new_id": "dcd2cc0d636e09e9a3f44eb456555d327b4d26f4",
      "new_mode": 33188,
      "new_path": "absl/container/internal/raw_hash_set.cc"
    }
  ]
}
