[all-commits] [llvm/llvm-project] 8701b1: [MLIR][OpenMP] Changes to function-filtering pass ...

Akash Banerjee via All-commits all-commits at lists.llvm.org
Tue Nov 14 04:43:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8701b178e06bde5a063407605c44bbbbf9619134
      https://github.com/llvm/llvm-project/commit/8701b178e06bde5a063407605c44bbbbf9619134
  Author: Akash Banerjee <akash.banerjee at amd.com>
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Optimizer/Transforms/OMPFunctionFiltering.cpp
    M flang/test/Lower/OpenMP/FIR/array-bounds.f90
    M flang/test/Lower/OpenMP/function-filtering.f90
    M flang/test/Transforms/omp-function-filtering.mlir
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  [MLIR][OpenMP] Changes to function-filtering pass (#71850)

Currently, when deleting the device functions in the second stage of filtering during MLIR to LLVM translation we can end up with invalid calls to these functions. This is because of the removal of the EarlyOutliningPass which would have otherwise gotten rid of any such calls.

This patch aims to alter the function filtering pass in the following way:
	- Any host function is completely removed.
	- Call to the host function are also removed and their uses replaced with Undef values.
	- Any host function with target region code is marked to be removed during the the second stage.
	- Calls to such functions are still removed and their uses replaced with Undef values.

Co-authored-by: Sergio Afonso <sergio.afonsofumero at amd.com>




More information about the All-commits mailing list