brintos

brintos / llvm-project-archived public Read only

0
0
Text · 840 B · 3ffbbaf Raw
22 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "mlir/Conversion/LLVMCommon/LoweringOptions.h"10#include "mlir/IR/BuiltinTypes.h"11#include "mlir/Interfaces/DataLayoutInterfaces.h"12 13using namespace mlir;14 15mlir::LowerToLLVMOptions::LowerToLLVMOptions(MLIRContext *ctx)16    : LowerToLLVMOptions(ctx, DataLayout()) {}17 18mlir::LowerToLLVMOptions::LowerToLLVMOptions(MLIRContext *ctx,19                                             const DataLayout &dl) {20  indexBitwidth = dl.getTypeSizeInBits(IndexType::get(ctx));21}22