)]}'
{
  "commit": "dda73336ad22bd0b5ecda17040c50fb10fcbe5fb",
  "tree": "c5655d75797516814f2508c98dc21408e7e67e8f",
  "parents": [
    "999b9e6ddb4324600a46c8f7006acec81fe3af0f"
  ],
  "author": {
    "name": "Mingming Liu",
    "email": "mingmingl@google.com",
    "time": "Wed Apr 10 19:46:01 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Apr 10 19:46:01 2024 -0700"
  },
  "message": "[ThinLTO]Record import type in GlobalValueSummary::GVFlags (#87597)\n\nThe motivating use case is to support import the function declaration\r\nacross modules to construct call graph edges for indirect calls [1]\r\nwhen importing the function definition costs too much compile time\r\n(e.g., the function is too large has no `noinline` attribute).\r\n1. Currently, when the compiled IR module doesn\u0027t have a function\r\ndefinition but its postlink combined summary contains the function\r\nsummary or a global alias summary with this function as aliasee, the\r\nfunction definition will be imported from source module by IRMover. The\r\nimplementation is in FunctionImporter::importFunctions [2]\r\n2. In order for FunctionImporter to import a declaration of a function,\r\nboth function summary and alias summary need to carry the def / decl\r\nstate. Specifically, all existing summary fields doesn\u0027t differ across\r\nimport modules, but the def / decl state of is decided by\r\n`\u003cImportModule, Function\u003e`.\r\n\r\nThis change encodes the def/decl state in `GlobalValueSummary::GVFlags`.\r\n\r\nIn the subsequent changes\r\n1. The indexing step `computeImportForModule` [3]\r\nwill compute the set of definitions and the set of declarations for each\r\nmodule, and passing on the information to bitcode writer.\r\n2. Bitcode writer will look up the def/decl state and sets the state\r\nwhen it writes out the flag value. This is demonstrated in\r\nhttps://github.com/llvm/llvm-project/pull/87600\r\n3. Function importer will read the def/decl state when reading the\r\ncombined summary to figure out two sets of global values, and IRMover\r\nwill be updated to import the declaration (aka linkGlobalValuePrototype [4])\r\ninto the destination module.\r\n\r\n- The next change is https://github.com/llvm/llvm-project/pull/87600\r\n\r\n[1] mentioned in rfc https://discourse.llvm.org/t/rfc-for-better-call-graph-sort-build-a-more-complete-call-graph-by-adding-more-indirect-call-edges/74029#support-cross-module-function-declaration-import-5\r\n[2] https://github.com/llvm/llvm-project/blob/3b337242ee165554f0017b00671381ec5b1ba855/llvm/lib/Transforms/IPO/FunctionImport.cpp#L1608-L1764\r\n[3] https://github.com/llvm/llvm-project/blob/3b337242ee165554f0017b00671381ec5b1ba855/llvm/lib/Transforms/IPO/FunctionImport.cpp#L856\r\n[4] https://github.com/llvm/llvm-project/blob/3b337242ee165554f0017b00671381ec5b1ba855/llvm/lib/Linker/IRMover.cpp#L605",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2309ed717c2a23edbae4a69bd4fccd96dc20bccf",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll",
      "new_id": "433fd1fe204304962752ed13e5846f18bf94c580",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll"
    },
    {
      "type": "modify",
      "old_id": "f5dde2d32a42da93e733dac47da8224962e95e92",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGen/thinlto-distributed-cfi.ll",
      "new_id": "47e56c091a6120e579859cb27d16ca126ab0190e",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGen/thinlto-distributed-cfi.ll"
    },
    {
      "type": "modify",
      "old_id": "c1274776fe9ce8b352b6b57a4518627952e47432",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGen/thinlto-funcattr-prop.ll",
      "new_id": "daaa6e2da804867c0a11db9a4f5a62ddfcbbbb3c",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGen/thinlto-funcattr-prop.ll"
    },
    {
      "type": "modify",
      "old_id": "eef17d41c5a4dd807b0883c3ef80fb6d01245b21",
      "old_mode": 33188,
      "old_path": "lld/test/ELF/lto/comdat-nodeduplicate.ll",
      "new_id": "13d4ab394813b8e2b8a24ef79835f5aa2bb5a97b",
      "new_mode": 33188,
      "new_path": "lld/test/ELF/lto/comdat-nodeduplicate.ll"
    },
    {
      "type": "modify",
      "old_id": "b4e971fea1a1391d8954b03558f324e9b20826b6",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/AsmParser/LLParser.h",
      "new_id": "b2dcdfad0a04b4c64b725280d63a24aec7d069ee",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/AsmParser/LLParser.h"
    },
    {
      "type": "modify",
      "old_id": "65ccb1b81b3a87f2dbad96e8786ab1b2f0ca9c4c",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/AsmParser/LLToken.h",
      "new_id": "0cbcdcd9ffac773b1cfc3a8acff35e2d37661332",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/AsmParser/LLToken.h"
    },
    {
      "type": "modify",
      "old_id": "d5ff15063671d8376130f18bb9135a3881fdd688",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/IR/ModuleSummaryIndex.h",
      "new_id": "5d137d4b3553cfce959865e7b7945ca6fe92c50f",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/IR/ModuleSummaryIndex.h"
    },
    {
      "type": "modify",
      "old_id": "33e57e5f2102fdeace613512722ad9dd2ada7e69",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/IR/ModuleSummaryIndexYAML.h",
      "new_id": "b2747d24c5396d90e0cdfd5137c1191e719ff785",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/IR/ModuleSummaryIndexYAML.h"
    },
    {
      "type": "modify",
      "old_id": "3ad0bab827a512d6f5b0e8b07852fd12ddbca8eb",
      "old_mode": 33188,
      "old_path": "llvm/lib/Analysis/ModuleSummaryAnalysis.cpp",
      "new_id": "deda1eebb3b57c6024fd12459712f02c962070dc",
      "new_mode": 33188,
      "new_path": "llvm/lib/Analysis/ModuleSummaryAnalysis.cpp"
    },
    {
      "type": "modify",
      "old_id": "2301a27731eaffc84fa2cd74ffe478309b0b9326",
      "old_mode": 33188,
      "old_path": "llvm/lib/AsmParser/LLLexer.cpp",
      "new_id": "8ded07ffd8bd25f19c9c11d5a6e91b2a39185196",
      "new_mode": 33188,
      "new_path": "llvm/lib/AsmParser/LLLexer.cpp"
    },
    {
      "type": "modify",
      "old_id": "f546e05a5d37d4d33c968952c3922ca415b5bcde",
      "old_mode": 33188,
      "old_path": "llvm/lib/AsmParser/LLParser.cpp",
      "new_id": "63104129f8c2df6dd4f582c7aa9d8682ab606f61",
      "new_mode": 33188,
      "new_path": "llvm/lib/AsmParser/LLParser.cpp"
    },
    {
      "type": "modify",
      "old_id": "92c349525aff56c0adb642ebbb556ba0b976ddcb",
      "old_mode": 33188,
      "old_path": "llvm/lib/Bitcode/Reader/BitcodeReader.cpp",
      "new_id": "fe4f0d6dca6c0c7d9a028bca8f6db99b6e3889cf",
      "new_mode": 33188,
      "new_path": "llvm/lib/Bitcode/Reader/BitcodeReader.cpp"
    },
    {
      "type": "modify",
      "old_id": "dd554e422516f65b1fcfcd3cd55ba9f0fb5e2756",
      "old_mode": 33188,
      "old_path": "llvm/lib/Bitcode/Writer/BitcodeWriter.cpp",
      "new_id": "6d01e3b4d82189437624f1494977ac6d0c18b5ee",
      "new_mode": 33188,
      "new_path": "llvm/lib/Bitcode/Writer/BitcodeWriter.cpp"
    },
    {
      "type": "modify",
      "old_id": "b778a14158ef2be0ba8d3fe946c86bec5e8b4be8",
      "old_mode": 33188,
      "old_path": "llvm/lib/IR/AsmWriter.cpp",
      "new_id": "609de920ba7dd13c103982037afe857ccb6d2e0c",
      "new_mode": 33188,
      "new_path": "llvm/lib/IR/AsmWriter.cpp"
    },
    {
      "type": "modify",
      "old_id": "198c730418c724d33ce80ffb9f3741d7f9280c61",
      "old_mode": 33188,
      "old_path": "llvm/lib/IR/ModuleSummaryIndex.cpp",
      "new_id": "6713d32fb787ced62494f78935b3092d7f78ab0c",
      "new_mode": 33188,
      "new_path": "llvm/lib/IR/ModuleSummaryIndex.cpp"
    },
    {
      "type": "modify",
      "old_id": "b72271bb401fd927b8b8e5e9ccbbdff866067588",
      "old_mode": 33188,
      "old_path": "llvm/test/Assembler/thinlto-memprof-summary.ll",
      "new_id": "69eafc967c2a39118f93bf2499560f5492e8e7c5",
      "new_mode": 33188,
      "new_path": "llvm/test/Assembler/thinlto-memprof-summary.ll"
    },
    {
      "type": "modify",
      "old_id": "4f849fa6e6adcedcd99306aed2954c90927c06e0",
      "old_mode": 33188,
      "old_path": "llvm/test/Assembler/thinlto-multiple-summaries-for-guid.ll",
      "new_id": "117280a279d09f71b546a17709b6353ff85e95c6",
      "new_mode": 33188,
      "new_path": "llvm/test/Assembler/thinlto-multiple-summaries-for-guid.ll"
    },
    {
      "type": "modify",
      "old_id": "77f652a9e97dc33deeff745fb788c142f08da906",
      "old_mode": 33188,
      "old_path": "llvm/test/Assembler/thinlto-summary-visibility.ll",
      "new_id": "67ddcb961d7ae999eec5098e8d183d0c599fcc5e",
      "new_mode": 33188,
      "new_path": "llvm/test/Assembler/thinlto-summary-visibility.ll"
    },
    {
      "type": "modify",
      "old_id": "9eb3c6669780d69dffcd0f8042d5c0074d8811ac",
      "old_mode": 33188,
      "old_path": "llvm/test/Assembler/thinlto-summary.ll",
      "new_id": "05dad2c7acad46c22d7f9dd723a0b3ab428505a2",
      "new_mode": 33188,
      "new_path": "llvm/test/Assembler/thinlto-summary.ll"
    },
    {
      "type": "modify",
      "old_id": "5a0ff32a83904b7f970ebb0704f34b8e2852e582",
      "old_mode": 33188,
      "old_path": "llvm/test/Assembler/thinlto-vtable-summary.ll",
      "new_id": "80720287f7a0916e6e08b64d70b699653ac11582",
      "new_mode": 33188,
      "new_path": "llvm/test/Assembler/thinlto-vtable-summary.ll"
    },
    {
      "type": "modify",
      "old_id": "eb794f4e631d1fcb32b062a329afb7bb0b0321fe",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-alias.ll",
      "new_id": "5dfff0f796198d3075f2ffe01d347b4355ab2440",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-alias.ll"
    },
    {
      "type": "modify",
      "old_id": "ba3ce9a75ee83213804ae2eb2be3e79d96269d24",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-func-summary-vtableref-pgo.ll",
      "new_id": "19e228fd5355c71e8b4b4861175a56f0b190b099",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-func-summary-vtableref-pgo.ll"
    },
    {
      "type": "modify",
      "old_id": "d7679b6f5af20c58b67a17013dd0328d227b50ab",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll",
      "new_id": "563fb18107d35fd7bf21d377b9d1ce201824237d",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll"
    },
    {
      "type": "modify",
      "old_id": "ca4f62907cb0a6c4fd022b0d4c95260f2fac2bcf",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll",
      "new_id": "3c827247a6c9fceb5553253e64219bed86f329fb",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll"
    },
    {
      "type": "modify",
      "old_id": "fc42b5369644cae62c16168018ea42034e5b84a9",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-function-summary-refgraph.ll",
      "new_id": "c76d70b8c4cc00f4d3d2d2e87004bd236af02a1b",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-function-summary-refgraph.ll"
    },
    {
      "type": "modify",
      "old_id": "0d6a8e3b4b8d5d3ab2e1cab8acda0fc91d78b2ff",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-index-disassembled-by-llvm-dis.ll",
      "new_id": "3a121c2d5d4263c8b7bf71d843bce4af5944810d",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-index-disassembled-by-llvm-dis.ll"
    },
    {
      "type": "modify",
      "old_id": "76021a87c52c11199dbe59c4b94eaae8379239d8",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-type-tests.ll",
      "new_id": "6dc49b849c2fe44d73500335e6eb9294f0753878",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-type-tests.ll"
    },
    {
      "type": "modify",
      "old_id": "ede5b483bfebfa6255874f1869484dbcdd487dbb",
      "old_mode": 33188,
      "old_path": "llvm/test/Bitcode/thinlto-type-vcalls.ll",
      "new_id": "16c93097101dfb92ff0d34917e2feeb619be9a13",
      "new_mode": 33188,
      "new_path": "llvm/test/Bitcode/thinlto-type-vcalls.ll"
    },
    {
      "type": "modify",
      "old_id": "53122160b1b253ab3c9573358abe0feab28238d2",
      "old_mode": 33188,
      "old_path": "llvm/test/ThinLTO/X86/dot-dumper.ll",
      "new_id": "149039203a68c59cbd9b66860753d39a1d780381",
      "new_mode": 33188,
      "new_path": "llvm/test/ThinLTO/X86/dot-dumper.ll"
    },
    {
      "type": "modify",
      "old_id": "6489e952251d047d310a85d073a1a11f77ccdd3d",
      "old_mode": 33188,
      "old_path": "llvm/test/ThinLTO/X86/funcattrs-prop-maythrow.ll",
      "new_id": "abfe820075bb9f1b6fc27d92cc186a043df1a8d4",
      "new_mode": 33188,
      "new_path": "llvm/test/ThinLTO/X86/funcattrs-prop-maythrow.ll"
    },
    {
      "type": "modify",
      "old_id": "90c708fd2d115ff329e33453f66681b929558108",
      "old_mode": 33188,
      "old_path": "llvm/test/ThinLTO/X86/funcimport_alwaysinline.ll",
      "new_id": "67acc2a2892dbeff44223e1a54a8d17d74edcc43",
      "new_mode": 33188,
      "new_path": "llvm/test/ThinLTO/X86/funcimport_alwaysinline.ll"
    },
    {
      "type": "modify",
      "old_id": "4fb2d4693042e9cae132c1ea26eda9362f7a28c3",
      "old_mode": 33188,
      "old_path": "llvm/test/ThinLTO/X86/load-store-caching.ll",
      "new_id": "b25308bf176168138b90793aea661e83639ac73e",
      "new_mode": 33188,
      "new_path": "llvm/test/ThinLTO/X86/load-store-caching.ll"
    },
    {
      "type": "modify",
      "old_id": "76afe68d21891bd58f71ed955ecc49173192bd9c",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/LowerTypeTests/import-unsat.ll",
      "new_id": "f766c2d324163ec7e1e4f2d0cd661b4b32c2c956",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/LowerTypeTests/import-unsat.ll"
    },
    {
      "type": "modify",
      "old_id": "30159c5012b08ffcda180a54005307792443ddfe",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/WholeProgramDevirt/Inputs/import-indir.yaml",
      "new_id": "22533ed636a50a3f78df9c9a36e0745efb3e7c9f",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/WholeProgramDevirt/Inputs/import-indir.yaml"
    },
    {
      "type": "modify",
      "old_id": "1d74a597697876492ba2f6c981918f6f92bddbb6",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/WholeProgramDevirt/import-indir.ll",
      "new_id": "e4d6f1d52b540d93dd9d77a11dd4713ede8a46e1",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/WholeProgramDevirt/import-indir.ll"
    }
  ]
}
