)]}'
{
  "commit": "f06c804f9ec79e16da7dcee1af81afd7b95a8bb1",
  "tree": "03832448cdcd7e0a269157b85ef40ea24de56408",
  "parents": [
    "4395a123bfc709ff2c5203b5c9407a43f7ee5c26"
  ],
  "author": {
    "name": "Scott Todd",
    "email": "scotttodd@google.com",
    "time": "Thu Nov 04 08:09:46 2021 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Nov 04 08:09:46 2021 -0700"
  },
  "message": "Add statistics to Util/Transforms/FoldGlobals.cpp. (#7535)\n\nFollowing up on https://github.com/google/iree/pull/7312#discussion_r728261108, this adds more [statistics](https://mlir.llvm.org/docs/PassManagement/#pass-statistics) to IREE\u0027s compiler passes. I personally build with the CMake option `-DLLVM_FORCE_ENABLE_STATS\u003dON` so the `-pass-statistics` flag works in `RelWithDebInfo` builds, but we don\u0027t yet have anything like that configured on our CI or recommended in our developer documentation. See also https://github.com/google/iree/issues/6161#issuecomment-912635307 for how this could be useful.\r\n\r\nSample output on [bert_encoder_unrolled_fake_weights.mlir](https://github.com/google/iree/blob/main/iree/test/e2e/models/bert_encoder_unrolled_fake_weights.mlir) (fake weights are folded aggressively 😛):\r\n\r\n```\r\nmlir::iree_compiler::IREE::Util::`anonymous-namespace\u0027::FoldGlobalsPass\r\n  (S) 1113 global ops before folding - Number of util.global ops before folding\r\n  (S)    7 global ops after folding  - Number of util.global ops after folding\r\n```",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "94d5b268cf6a919657fecfbbc387837009ea847d",
      "old_mode": 33188,
      "old_path": "iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp",
      "new_id": "10b012cc223422e147f7007b0b429f445f4b3205",
      "new_mode": 33188,
      "new_path": "iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp"
    }
  ]
}
