)]}'
{
  "commit": "3eeed90f7f73eac8d83e25c4ba756f5164c0600f",
  "tree": "a3548401b893aa9853d1edd58e191062946e1ba1",
  "parents": [
    "47238df8198e06fcaf41858114fdac5d6c1ba4dc"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "antiagainst@google.com",
    "time": "Wed Jul 28 14:07:47 2021 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 28 11:07:47 2021 -0700"
  },
  "message": "[spirv] Create variables early for conversion and deduplication (#6574)\n\n`hal.interface.binding.subspan` to `spv.GlobalVariable` conversion\r\nis tricky due to their different scopes (function vs. module),\r\nSSA values vs. symbols, and the need to attach `alias` decorations.\r\n\r\nPreviously we create `spv.GlobalVariable` in the middle of the\r\nconversion procedure, it requires us to pass down a few data\r\nstructures to the pattern so that we can access the alias\r\nstatus. Notably, it requires us to pass in a `SymbolTable` so\r\nthat we can unique symbols. The `SymbolTable` needs to be created\r\nbefore the conversion; otherwise we will see errors. It\u0027s relying\r\non `SymbolTable` and conversion framework implementation details;\r\nso quite opaque.\r\n\r\nThis commit changes to create the global variables earlier, at the\r\nalias analysis step. Then during conversion, we just need to\r\nlook up the table and perform mechanical rewrite, plus type fixup.\r\nThis limits all the `SymbolTable` access to a much smaller scope.\r\nMore importantly, we can also perform some deduplication for\r\ncreated global variables to generate smaller SPIR-V blobs.\r\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b79eac9cf9fb71f767a744c16ba6e221b6f0e944",
      "old_mode": 33188,
      "old_path": "iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp",
      "new_id": "7c3cbb7db19ccc45fec072530d76963be531feba",
      "new_mode": 33188,
      "new_path": "iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp"
    },
    {
      "type": "modify",
      "old_id": "abc817f14b1936a6e66690b23efa49018ed7da49",
      "old_mode": 33188,
      "old_path": "iree/compiler/Codegen/SPIRV/test/convert_to_spirv.mlir",
      "new_id": "a7d78af25df83ea0caba86200c33e23835134776",
      "new_mode": 33188,
      "new_path": "iree/compiler/Codegen/SPIRV/test/convert_to_spirv.mlir"
    }
  ]
}
