[all-commits] [llvm/llvm-project] bd2255: [MLIR][GPU] Run generic LLVM optimizations when se...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Fri Nov 19 11:21:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd22554af06e1f16dc9ff12eac8987f0ceebe8c1
      https://github.com/llvm/llvm-project/commit/bd22554af06e1f16dc9ff12eac8987f0ceebe8c1
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2021-11-19 (Fri, 19 Nov 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/GPU/Transforms/SerializeToBlob.cpp
    M mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp

  Log Message:
  -----------
  [MLIR][GPU] Run generic LLVM optimizations when serializing (on AMD)

- Adds hooks that allow SerializeTo* passes to arbitrarily transform
the produced LLVM Module before it is passed to the code generation
passes.

- Uses these hooks within the SerializeToHsaco pass in order to run
LLVM optimizations and to set the optimization level on the
TargetMachine.

- Adds an optLevel parameter to SerializeToHsaco

Future work may include moving much of what's been added to
SerializeToHsaco to SerializeToBlob, but that would require
confirmation from the NVVM backend maintainers that it would be
appropriate to do so.

Depends on D114107

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D114113




More information about the All-commits mailing list