)]}'
{
  "commit": "1c21d5cb9b8e48ab928919a6f358eba8ffd3b49c",
  "tree": "35d713fa74a3900c43a5ff0b607ce504c0fd265c",
  "parents": [
    "6931bad36c0ddae441d115814022fd5d3cbc554b"
  ],
  "author": {
    "name": "David Green",
    "email": "david.green@arm.com",
    "time": "Mon Sep 15 07:32:00 2025 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Sep 15 07:32:00 2025 +0100"
  },
  "message": "[GlobalISel] Remove GI known bits cache (#157352)\n\nThere is a cache on the known-bit computed by global-isel. It only works\ninside a single query to computeKnownBits, which limits its usefulness,\nand according to the tests can sometimes limit the effectiveness of\nknown-bits queries. (Although some AMD tests look longer). Keeping the\ncache valid and clearing it at the correct times can also require being\ncareful about the functions called inside known-bits queries.\n\nI measured compile-time of removing it and came up with:\n```\n7zip      2.06405E+11     2.06436E+11     0.015018992\nBullet    1.01298E+11     1.01186E+11     -0.110236169\nClamAV    57942466667     57848066667     -0.16292023\nSPASS     45444466667     45402966667     -0.091320249\nconsumer  35432466667     35381233333     -0.144594317\nkimwitu++ 40858833333     40927933333     0.169118877\nlencod    70022366667     69950633333     -0.102443457\nmafft     38439900000     38413233333     -0.069372362\nsqlite3   35822266667     35770033333     -0.145812474\ntramp3d   82083133333     82045600000     -0.045726\nAverage                                   -0.068828739\n```\nThe last column is % difference between with / without the cache. So in\ntotal it seems to be costing slightly more to keep the current\nknown-bits cache than if it was removed. (Measured in instruction count,\nsimilar to llvm-compile-time-tracker).\n\nThe hit rate wasn\u0027t terrible - higher than I expected. In the\nllvm-test-suite+external projects it was hit 4791030 times out of\n91107008 queries, slightly more than 5%.\n\nNote that as globalisel increases in complexity, more known bits calls\nmight be made and the numbers might shift. If that is the case it might\nbe better to have a cache that works across calls, providing it doesn\u0027t\nmake effectiveness worse.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "490d1a34cc84689126c8ccc6ff02dd9d73b63354",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h",
      "new_id": "3bf9d694b1b21c5298c241b550147e04857cb290",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/CodeGen/GlobalISel/GISelValueTracking.h"
    },
    {
      "type": "modify",
      "old_id": "0cf44e02254de21f492f4f77d507c28ebc9cb570",
      "old_mode": 33188,
      "old_path": "llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp",
      "new_id": "9b4c103763d74fa4e3af5ea8f203c20731116d13",
      "new_mode": 33188,
      "new_path": "llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp"
    },
    {
      "type": "modify",
      "old_id": "599fa510d4aea1c592c7a7d34556ac7ad47e8498",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/rem-by-const.ll",
      "new_id": "1cb92e46cbcd12e0ada7c9832d0d385e8b004235",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/rem-by-const.ll"
    },
    {
      "type": "modify",
      "old_id": "f57fc005b994bfd94a9d94d1fb873ec66eb03fb6",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll",
      "new_id": "9ffc565d9d47a8be471c98f180f4367f65461e66",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll"
    },
    {
      "type": "modify",
      "old_id": "19dc20c510041e2cad3ad590ba7546c2a8e72f4a",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll",
      "new_id": "82279e641ed63f460a5666915c7c2aefe478f305",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll"
    },
    {
      "type": "modify",
      "old_id": "6864afe3855f4261b419196cc3c8482a2ff3c72e",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/GlobalISel/div-by-constant.ll",
      "new_id": "225ceed9627b7b085b87442f1055fd6af5f30dab",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/GlobalISel/div-by-constant.ll"
    },
    {
      "type": "modify",
      "old_id": "089fb00d6080d07165d3e4ace03a415899ef3578",
      "old_mode": 33188,
      "old_path": "llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp",
      "new_id": "8563d7f1f15c9b03a3e8d33b63a85529b69fc783",
      "new_mode": 33188,
      "new_path": "llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp"
    },
    {
      "type": "modify",
      "old_id": "73ddf0c88d3ed0984e91d51805c264649e40d825",
      "old_mode": 33188,
      "old_path": "llvm/unittests/CodeGen/GlobalISel/KnownBitsVectorTest.cpp",
      "new_id": "6b70ae973917979fc5c93cbd22e49931721d3be6",
      "new_mode": 33188,
      "new_path": "llvm/unittests/CodeGen/GlobalISel/KnownBitsVectorTest.cpp"
    }
  ]
}
