)]}'
{
  "commit": "82ada737b1cd05d69f15283415691e8411c0789a",
  "tree": "ed67b919ce856742d11696b06ca99bf87ad67152",
  "parents": [
    "3fb490cba476723e6fd4a5935f0b886ca4484eb1"
  ],
  "author": {
    "name": "Timm Baeder",
    "email": "tbaeder@redhat.com",
    "time": "Thu Aug 28 16:46:09 2025 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 28 16:46:09 2025 +0200"
  },
  "message": "[clang] Optimize EmbedExpr child iterator callback (#155803)\n\nInstead of querying the bitwidth and signeness of the integer literal\nfor every iteration, get the bitwidth directly from the `APIntStorage`\nand assume the signeness to be `true` since we set the type of the\n`EmbedExpr` to `Ctx.IntTy` and the type of the integer literal to that\nof the `EmbedExpr`, so it should always be signed, as long as\n`ASTContext::IntTy` is signed.\n\nBefore:\n```\n$ hyperfine -r 50 -w 3 \u0027bin/clang -c ../../benchmarks/embed.cpp -std\u003dc++20 -fconstexpr-steps\u003d1000000000\u0027\nBenchmark 1: bin/clang -c ../../benchmarks/embed.cpp -std\u003dc++20 -fconstexpr-steps\u003d1000000000\n  Time (mean ± σ):      1.796 s ±  0.090 s    [User: 0.961 s, System: 0.834 s]\n  Range (min … max):    1.640 s …  2.150 s    50 runs\n```\nAfter:\n```\n$ hyperfine -r 50 -w 3 \u0027bin/clang -c ../../benchmarks/embed.cpp -std\u003dc++20 -fconstexpr-steps\u003d1000000000\u0027\nBenchmark 1: bin/clang -c ../../benchmarks/embed.cpp -std\u003dc++20 -fconstexpr-steps\u003d1000000000\n  Time (mean ± σ):      1.700 s ±  0.050 s    [User: 0.909 s, System: 0.789 s]\n  Range (min … max):    1.637 s …  1.880 s    50 runs\n```\n\nThat is roughly .1s less, or whatever, 5% or something.\n\nThe benchmark is simply:\n```c++\nconstexpr char str[] \u003d {\n#embed \"sqlite3.c\" suffix(,0)\n};\n\nconstexpr char str2[] \u003d {\n#embed \"sqlite3.c\" suffix(,0)\n};\n\nconstexpr char str3[] \u003d {\n#embed \"sqlite3.c\" suffix(,0)\n};\n```\nwhere `sqlite3.c` contains the sqlite3 amalgamation (roughly 9 million\ncharacters).",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "95eddbcd86e839c8c7ed6ee196733026d402663d",
      "old_mode": 33188,
      "old_path": "clang/include/clang/AST/APNumericStorage.h",
      "new_id": "e1948a552bf7eaec19ebc6854adf16eb096532a4",
      "new_mode": 33188,
      "new_path": "clang/include/clang/AST/APNumericStorage.h"
    },
    {
      "type": "modify",
      "old_id": "574ee54077ce77feb7c5edeaae519238cb30cf48",
      "old_mode": 33188,
      "old_path": "clang/include/clang/AST/Expr.h",
      "new_id": "23a0996f02725d0599f8cd8bdbdefb95da29fe2b",
      "new_mode": 33188,
      "new_path": "clang/include/clang/AST/Expr.h"
    },
    {
      "type": "modify",
      "old_id": "512f152059a01bf4574d91f83e6aec2aeb48be08",
      "old_mode": 33188,
      "old_path": "clang/lib/AST/Expr.cpp",
      "new_id": "cdff160067fed662a8d5b994047aac2f5f7f8d8b",
      "new_mode": 33188,
      "new_path": "clang/lib/AST/Expr.cpp"
    },
    {
      "type": "modify",
      "old_id": "be9bad9e96cc16211cac2b5e4ffebc7725e2cdd3",
      "old_mode": 33188,
      "old_path": "clang/lib/Serialization/ASTWriterStmt.cpp",
      "new_id": "301ed9b23c2064cc868cfe440d398bfe6b46e758",
      "new_mode": 33188,
      "new_path": "clang/lib/Serialization/ASTWriterStmt.cpp"
    }
  ]
}
