[all-commits] [llvm/llvm-project] 06831d: [mlir][OpenMP] Pack task private variables into a ...

Tom Eccles via All-commits all-commits at lists.llvm.org
Thu Feb 6 02:04:29 PST 2025


  Branch: refs/heads/users/tblah/delayed-task-exec-5
  Home:   https://github.com/llvm/llvm-project
  Commit: 06831df6909ff246ccd541e4f4c39fd47fd993a4
      https://github.com/llvm/llvm-project/commit/06831df6909ff246ccd541e4f4c39fd47fd993a4
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Target/LLVMIR/openmp-llvm.mlir
    A mlir/test/Target/LLVMIR/openmp-task-privatization.mlir

  Log Message:
  -----------
  [mlir][OpenMP] Pack task private variables into a heap-allocated context struct

See RFC:
https://discourse.llvm.org/t/rfc-openmp-supporting-delayed-task-execution-with-firstprivate-variables/83084

The aim here is to ensure that tasks which are not executed for a while
after they are created do not try to reference any data which are now
out of scope. This is done by packing the data referred to by the task
into a heap allocated structure (freed at the end of the task).

I decided to create the task context structure in
OpenMPToLLVMIRTranslation instead of adapting how it is done
CodeExtractor (via OpenMPIRBuilder] because CodeExtractor is (at least
in theory) generic code which could have other unrelated uses.


  Commit: ff6f22d6bba8278735676c52c7af7929e3d1edc0
      https://github.com/llvm/llvm-project/commit/ff6f22d6bba8278735676c52c7af7929e3d1edc0
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/test/Target/LLVMIR/openmp-llvm.mlir

  Log Message:
  -----------
  Update after code review on previous patch


  Commit: 1d847fc83df54a8db6d7ceebf993b518d280d627
      https://github.com/llvm/llvm-project/commit/1d847fc83df54a8db6d7ceebf993b518d280d627
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Target/LLVMIR/openmp-llvm.mlir
    M mlir/test/Target/LLVMIR/openmp-task-privatization.mlir

  Log Message:
  -----------
  Allocate simple private vars inside of the task

There's no need to put the variable in the context structure if it can
be initialized without reading from the mold variable.

This leads to much simpler code generation for nested tasks which only
privatize simple scalar variables and do not use firstprivate. This
works around the failure in 0226_0013 (Fujitsu test).


  Commit: 7c1763f3b35af77fc4ebf07a75de986682e54040
      https://github.com/llvm/llvm-project/commit/7c1763f3b35af77fc4ebf07a75de986682e54040
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Add methods to operation to test if the mold arg is read


  Commit: 2b21aa9b05e44d72dd630fa68f1ab9e234f73de7
      https://github.com/llvm/llvm-project/commit/2b21aa9b05e44d72dd630fa68f1ab9e234f73de7
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Fix comment


  Commit: 4aa929d640d0ffcfce4c417bb9075314b842723b
      https://github.com/llvm/llvm-project/commit/4aa929d640d0ffcfce4c417bb9075314b842723b
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Remove outdated comment


  Commit: d9b71f4819d825af2ffe052096f1992f21587710
      https://github.com/llvm/llvm-project/commit/d9b71f4819d825af2ffe052096f1992f21587710
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Make logic clearer


  Commit: f5246d5f67aa7ac1b6a018db1ce65b24b6d9e5eb
      https://github.com/llvm/llvm-project/commit/f5246d5f67aa7ac1b6a018db1ce65b24b6d9e5eb
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Move llvm private vars into task context struct manager


  Commit: 64b73960b64eb18da54049b49c179ed6fc31335d
      https://github.com/llvm/llvm-project/commit/64b73960b64eb18da54049b49c179ed6fc31335d
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Fix comment


  Commit: 81a4ade52bb1d753af9678711432fcb9e4692864
      https://github.com/llvm/llvm-project/commit/81a4ade52bb1d753af9678711432fcb9e4692864
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Reserve the correct size


  Commit: b2aa3185d76eb1ac3fc61a580bf4d03d4d1b0c47
      https://github.com/llvm/llvm-project/commit/b2aa3185d76eb1ac3fc61a580bf4d03d4d1b0c47
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Update charbox comment


  Commit: 081fb2e9551442c8171b4b70635f079f50eae28c
      https://github.com/llvm/llvm-project/commit/081fb2e9551442c8171b4b70635f079f50eae28c
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  Rename llvmPrivateVars to llvmPrivateVarGEPs


Compare: https://github.com/llvm/llvm-project/compare/dd07fa7ae85c...081fb2e95514

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list