[all-commits] [llvm/llvm-project] e754d8: [flang] Move OpenMP-related code from `FirConverte...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Fri Dec 8 08:55:50 PST 2023


  Branch: refs/heads/users/kparzysz/02-add-openmp-mixin
  Home:   https://github.com/llvm/llvm-project
  Commit: e754d86e1c35d4417dfae8d270de7dee318f783e
      https://github.com/llvm/llvm-project/commit/e754d86e1c35d4417dfae8d270de7dee318f783e
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M flang/lib/Lower/Bridge.cpp
    A flang/lib/Lower/ConverterMixin.h
    M flang/lib/Lower/FirConverter.h
    M flang/lib/Lower/OpenMP.cpp
    A flang/lib/Lower/OpenMPMixin.h

  Log Message:
  -----------
  [flang] Move OpenMP-related code from `FirConverter` to `OpenMPMixin`

This improves the separation of the generic Fortran lowering and the
lowering of OpenMP constructs.

The mixin is intended to be derived from via CRTP:
```
  class FirConverter : public OpenMPMixin<FirConverter> ...
```

The primary goal of the mixin is to implement `genFIR` functions
that the derived converter can then call via
```
  std::visit([this](auto &&s) { genFIR(s); });
```

The mixin is also expecting a handful of functions to be present
in the derived class, most importantly `genFIR(Evaluation&)`, plus
getter classes for the op builder, symbol table, etc.

The pre-existing PFT-lowering functionality is preserved.




More information about the All-commits mailing list