)]}'
{
  "commit": "32cd18975d2e1de5a783e9b1c3c21a234d5723b4",
  "tree": "f0b404e096878ff28fbc951b20ffe8ed79f4134d",
  "parents": [
    "091ec15bbebf5be42d10f05a393489732ce651e4"
  ],
  "author": {
    "name": "Nikita Popov",
    "email": "npopov@redhat.com",
    "time": "Mon Jul 22 16:22:01 2024 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jul 22 16:22:01 2024 +0200"
  },
  "message": "[GVN] Look through select/phi when determining underlying object (#99509)\n\nThis addresses an optimization regression in Rust we have observed after\r\nhttps://github.com/llvm/llvm-project/pull/82458. We now only perform\r\npointer replacement if they have the same underlying object. However,\r\ngetUnderlyingObject() by default only looks through linear chains, not\r\nselects/phis. In particular, this means that we miss cases involving\r\ninvolving pointer induction variables.\r\n\r\nThis patch fixes this by introducing a new helper\r\ngetUnderlyingObjectAggressive() which basically does what\r\ngetUnderlyingObjects() does, just specialized to the case where we must\r\narrive at a single underlying object in the end, and with a limit on the\r\nnumber of inspected values.\r\n\r\nDoing this more expensive underlying object check has no measurable\r\ncompile-time impact on CTMark.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "44e27234aa90d0cd4e03b6cbc00b22aa777e0aa9",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/Analysis/ValueTracking.h",
      "new_id": "8e5a8dc483d274ff6b0bb45f0f2b7942314b3aad",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/Analysis/ValueTracking.h"
    },
    {
      "type": "modify",
      "old_id": "4f0b92f51777b698c74715f3f0650c2463554778",
      "old_mode": 33188,
      "old_path": "llvm/lib/Analysis/Loads.cpp",
      "new_id": "61c6aa5e5a3ebc2f4d982a63dbc449cb832184e8",
      "new_mode": 33188,
      "new_path": "llvm/lib/Analysis/Loads.cpp"
    },
    {
      "type": "modify",
      "old_id": "8f1c42b7ede44ec679f6a09a98a6c8d5a7afce5a",
      "old_mode": 33188,
      "old_path": "llvm/lib/Analysis/ValueTracking.cpp",
      "new_id": "40fe1ffe13f1b636945f5126060eaa7169891774",
      "new_mode": 33188,
      "new_path": "llvm/lib/Analysis/ValueTracking.cpp"
    },
    {
      "type": "modify",
      "old_id": "02f4bb97d7ebdab8b95fed2bc29cf8a8b1a90556",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/GVN/condprop.ll",
      "new_id": "3babdd8173a219c2d9b0597156f41e3df08880ab",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/GVN/condprop.ll"
    }
  ]
}
