FLANG
DataLayout.h
1//===-- Optimizer/Support/DataLayout.h --------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FORTRAN_OPTIMIZER_SUPPORT_DATALAYOUT_H
14#define FORTRAN_OPTIMIZER_SUPPORT_DATALAYOUT_H
15
16#include "mlir/Interfaces/DataLayoutInterfaces.h"
17#include <optional>
18
19namespace mlir {
20class ModuleOp;
21}
22namespace llvm {
23class DataLayout;
24}
25
26namespace fir::support {
32void setMLIRDataLayout(mlir::ModuleOp mlirModule, const llvm::DataLayout &dl);
33
38void setMLIRDataLayoutFromAttributes(mlir::ModuleOp mlirModule,
39 bool allowDefaultLayout);
40
46std::optional<mlir::DataLayout>
47getOrSetDataLayout(mlir::ModuleOp mlirModule, bool allowDefaultLayout = false);
48} // namespace fir::support
49
50#endif // FORTRAN_OPTIMIZER_SUPPORT_DATALAYOUT_H
Definition: AbstractConverter.h:27