)]}'
{
  "commit": "87bab31c27dee5ec69022df3beaa018744c4e8d1",
  "tree": "99ba8991023fa05846dc2582ee4b6effb27f2312",
  "parents": [
    "b32d078782c5e05d9a54ada1ba257edd31e28fe6"
  ],
  "author": {
    "name": "Pranav Bhandarkar",
    "email": "pranav.bhandarkar@amd.com",
    "time": "Mon Mar 23 12:49:49 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Mar 23 12:49:49 2026 -0500"
  },
  "message": "[Flang] - Add optional inlining of allocatable assignments with hlfir.expr RHS (#186880)\n\nAdd support for inlining hlfir.assign operations where the LHS is an\nallocatable and the RHS is an `hlfir.expr` (e.g., from\n`hlfir.elemental`). Since `hlfir.expr` values cannot alias with memory\nlocations, these assignments can be safely inlined without alias\nanalysis.\n\nThe optimization is controlled by the\n-inline-hlfir-allocatable-expr-assign flag:\nfir-opt -inline-hlfir-allocatable-expr-assign --inline-hlfir-assign\nfile.fir\n  flang -mmlir -inline-hlfir-allocatable-expr-assign file.f90\n\nThe generated code uses `fir::factory::genReallocIfNeeded` to properly\nhandle Fortran allocatable assignment semantics (F2018 10.2.1.3):\n- If not allocated: allocate with RHS shape\n- If allocated with same shape: reuse existing allocation\n- If allocated with different shape: reallocate\n\nThis is motivated by the increased link time that I am seeing when\n`__FortranAAssign` is called from the user code. The details of the\nproblem are documented in\nhttps://github.com/llvm/llvm-project/issues/187720",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "356552fac249d7a6c3559ee26d731519eb39f217",
      "old_mode": 33188,
      "old_path": "flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRAssign.cpp",
      "new_id": "160efede12bd5337b956f3d20498358745e10e02",
      "new_mode": 33188,
      "new_path": "flang/lib/Optimizer/HLFIR/Transforms/InlineHLFIRAssign.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6f3b5ea0eb794ce3035133363ab20544caba9e3d",
      "new_mode": 33188,
      "new_path": "flang/test/HLFIR/inline-hlfir-assign-allocatable-expr.fir"
    }
  ]
}
