)]}'
{
  "commit": "d8eca503e62c9315e16387b70ef2f582aa1cb03d",
  "tree": "44782f1e25b7dc794abf45da4f95bdbbae855267",
  "parents": [
    "8fb21f9db2ee52b6c210d87a880cfe9549b29603"
  ],
  "author": {
    "name": "adams381",
    "email": "adams@nvidia.com",
    "time": "Mon May 11 12:32:26 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon May 11 12:32:26 2026 -0500"
  },
  "message": "[CIR] Use SymbolTableCollection in LoweringPrepare\u0027s getCalledFunction (#195919)\n\n`LoweringPreparePass::lowerTrivialCopyCall` calls `getCalledFunction`\nonce per `cir.call`, which used the static\n`mlir::SymbolTable::lookupNearestSymbolFrom` — that function does a\nlinear scan of every operation in the module on each call, giving O(N ×\nM) total for N calls in an M-operation module.\n\nThe pass already maintains a `SymbolTableCollection` (used by\n`lowerStoreOfConstAggregate` and `lowerLocalInitOp`). Thread it through\n`getCalledFunction` and `lowerTrivialCopyCall` so the per-call lookup\nuses the cached hash-based path instead.\n\nMeasured on Eigen\u0027s `bdcsvd.cpp` (heavy template instantiation): the\n15.06% self-time hotspot from `getCalledFunction` is eliminated,\ncontributing roughly another 2x compile-time speedup on the slowest\ntests.\n\nThe cold path in `getOrCreateDtorFunc` (per-global, not per-call) is\nleft on the static lookup with an explanatory comment to avoid threading\n`symbolTables` through `emitGlobalGuardedDtorRegion` and its callers.\n\nCompanion to #195883 (`applyReplacements`) and #195916\n(`CIRToLLVMCallOpLowering`) — same algorithmic anti-pattern in three\ndifferent passes.\n\nMade with [Cursor](https://cursor.com)\n\nCo-authored-by: Cursor \u003ccursoragent@cursor.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "673ddf2da4cd669a8f5c1468fa147d8cd950b6ae",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp",
      "new_id": "ec16c162dbad43aae8a3dd2e6a0d2d70f0b0131a",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp"
    }
  ]
}
