MLIR
22.0.0git
lib
Conversion
LLVMCommon
LoweringOptions.cpp
Go to the documentation of this file.
1
//===- LoweringOptions.cpp - Common config for lowering to LLVM ----------===//
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
#include "
mlir/Conversion/LLVMCommon/LoweringOptions.h
"
10
#include "
mlir/IR/BuiltinTypes.h
"
11
#include "
mlir/Interfaces/DataLayoutInterfaces.h
"
12
13
using namespace
mlir
;
14
15
mlir::LowerToLLVMOptions::LowerToLLVMOptions
(
MLIRContext
*ctx)
16
:
LowerToLLVMOptions
(ctx,
DataLayout
()) {}
17
18
mlir::LowerToLLVMOptions::LowerToLLVMOptions
(
MLIRContext
*ctx,
19
const
DataLayout
&dl) {
20
indexBitwidth = dl.
getTypeSizeInBits
(IndexType::get(ctx));
21
}
DataLayoutInterfaces.h
LoweringOptions.h
mlir::DataLayout
The main mechanism for performing data layout queries.
Definition
DataLayoutInterfaces.h:220
mlir::DataLayout::getTypeSizeInBits
llvm::TypeSize getTypeSizeInBits(Type t) const
Returns the size in bits of the given type in the current scope.
Definition
DataLayoutInterfaces.cpp:569
mlir::LowerToLLVMOptions::LowerToLLVMOptions
LowerToLLVMOptions(MLIRContext *ctx)
Definition
LoweringOptions.cpp:15
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition
MLIRContext.h:63
BuiltinTypes.h
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
Generated on
for MLIR by
1.14.0