[all-commits] [llvm/llvm-project] e9639e: [flang][NFC] Extract FIROpConversion to its own fi...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Fri Mar 22 12:57:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9639e9c0636d9e2b9591c2cdac5cac75e363e77
      https://github.com/llvm/llvm-project/commit/e9639e9c0636d9e2b9591c2cdac5cac75e363e77
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
    A flang/include/flang/Optimizer/CodeGen/FIROpPatterns.h
    M flang/include/flang/Optimizer/CodeGen/TypeConverter.h
    M flang/lib/Optimizer/CodeGen/CMakeLists.txt
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    A flang/lib/Optimizer/CodeGen/FIROpPatterns.cpp

  Log Message:
  -----------
  [flang][NFC] Extract FIROpConversion to its own files (#86213)

This PR extracts `FIROpConversion` and `FIROpAndTypeConversion`
templated base patterns to a header file. All the functions from
FIROpConversion that do not require the template argument are moved to a
base class named `ConvertFIRToLLVMPattern`.
This move is done so the `FIROpConversion` pattern and all its utility
functions can be reused outside of the codegen pass.

For the most part the code is only moved to the new files and not
modified. The only update is that addition of the PatternBenefit
argument with a default value to the constructor so it can be forwarded
to the `ConversionPattern` ctor.

This split is done in a similar way for the `ConvertOpToLLVMPattern`
base pattern that is based on the `ConvertToLLVMPattern` base class in
`mlir/include/mlir/Conversion/LLVMCommon/Pattern.h`.



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