)]}'
{
  "commit": "c2f5309b216cb02a0aae17353549d985b5b05635",
  "tree": "f312a2dc615911d011dc26a3bde9c01188624431",
  "parents": [
    "41ede3aede2249a614e6081f8a44a756f6019aae"
  ],
  "author": {
    "name": "Tom Stellard",
    "email": "tstellar@redhat.com",
    "time": "Tue Oct 15 03:50:26 2019 +0000"
  },
  "committer": {
    "name": "Tom Stellard",
    "email": "tstellar@redhat.com",
    "time": "Tue Oct 15 03:50:26 2019 +0000"
  },
  "message": "Merging r372020 and r372182:\n\n------------------------------------------------------------------------\nr372020 | rnk | 2019-09-16 11:49:09 -0700 (Mon, 16 Sep 2019) | 30 lines\n\n[PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups\n\nThis fixes relocations against __profd_ symbols in discarded sections,\nwhich is PR41380.\n\nIn general, instrumentation happens very early, and optimization and\ninlining happens afterwards. The counters for a function are calculated\nearly, and after inlining, counters for an inlined function may be\nwidely referenced by other functions.\n\nFor C++ inline functions of all kinds (linkonce_odr \u0026\navailable_externally mainly), instr profiling wants to deduplicate these\n__profc_ and __profd_ globals. Otherwise the binary would be quite\nlarge.\n\nI made __profd_ and __profc_ comdat in r355044, but I chose to make\n__profd_ internal. At the time, I was only dealing with coverage, and in\nthat case, none of the instrumentation needs to reference __profd_.\nHowever, if you use PGO, then instrumentation passes add calls to\n__llvm_profile_instrument_range which reference __profd_ globals. The\nsolution is to make these globals externally visible by using\nlinkonce_odr linkage for data as was done for counters.\n\nThis is safe because PGO adds a CFG hash to the names of the data and\ncounter globals, so if different TUs have different globals, they will\nget different data and counter arrays.\n\nReviewers: xur, hans\n\nDifferential Revision: https://reviews.llvm.org/D67579\n------------------------------------------------------------------------\n\n------------------------------------------------------------------------\nr372182 | rnk | 2019-09-17 14:10:49 -0700 (Tue, 17 Sep 2019) | 12 lines\n\n[PGO] Don\u0027t use comdat groups for counters \u0026 data on COFF\n\nFor COFF, a comdat group is really a symbol marked\nIMAGE_COMDAT_SELECT_ANY and zero or more other symbols marked\nIMAGE_COMDAT_SELECT_ASSOCIATIVE. Typically the associative symbols in\nthe group are not external and are not referenced by other TUs, they are\nthings like debug info, C++ dynamic initializers, or other section\nregistration schemes. The Visual C++ linker reports a duplicate symbol\nerror for symbols marked IMAGE_COMDAT_SELECT_ASSOCIATIVE even if they\nwould be discarded after handling the leader symbol.\n\nFixes coverage-inline.cpp in check-profile after r372020.\n------------------------------------------------------------------------\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@374858 91177308-0d34-0410-b5e6-96231b3b80d8\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "63c2b8078967ae3ed8cf0ffedc762cd45d00f1ec",
      "old_mode": 33188,
      "old_path": "lib/Transforms/Instrumentation/InstrProfiling.cpp",
      "new_id": "5d3a793dda19a3d953b24e74b8ebcb1627c078d3",
      "new_mode": 33188,
      "new_path": "lib/Transforms/Instrumentation/InstrProfiling.cpp"
    },
    {
      "type": "modify",
      "old_id": "af95f9a455806da9eeedcce3ef87ded690717ef1",
      "old_mode": 33188,
      "old_path": "test/Instrumentation/InstrProfiling/PR23499.ll",
      "new_id": "a5e20b10c3efba9a8eda164e9a33ee8056cffbf5",
      "new_mode": 33188,
      "new_path": "test/Instrumentation/InstrProfiling/PR23499.ll"
    },
    {
      "type": "modify",
      "old_id": "03ee905fa65c1a142b58428b9211d198182fd268",
      "old_mode": 33188,
      "old_path": "test/Instrumentation/InstrProfiling/comdat.ll",
      "new_id": "5ff820cc03380fbaa17108980ffcb03390a1abbc",
      "new_mode": 33188,
      "new_path": "test/Instrumentation/InstrProfiling/comdat.ll"
    },
    {
      "type": "modify",
      "old_id": "29ae5d6e90cb5fdd4519930c33477087366415cf",
      "old_mode": 33188,
      "old_path": "test/Instrumentation/InstrProfiling/linkage.ll",
      "new_id": "13e389bb4e9e85c68dd3e59ae54e20f509c3c874",
      "new_mode": 33188,
      "new_path": "test/Instrumentation/InstrProfiling/linkage.ll"
    }
  ]
}
