MLIR  19.0.0git
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 
10 #include "mlir/IR/BuiltinTypes.h"
12 
13 using namespace mlir;
14 
16  : LowerToLLVMOptions(ctx, DataLayout()) {}
17 
19  const DataLayout &dl) {
20  indexBitwidth = dl.getTypeSizeInBits(IndexType::get(ctx));
21 }
The main mechanism for performing data layout queries.
llvm::TypeSize getTypeSizeInBits(Type t) const
Returns the size in bits of the given type in the current scope.
Options to control the LLVM lowering.
LowerToLLVMOptions(MLIRContext *ctx)
MLIRContext is the top-level object for a collection of MLIR operations.
Definition: MLIRContext.h:60
Include the generated interface declarations.
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...