FLANG
FIROps.h
1//===-- Optimizer/Dialect/FIROps.h - FIR operations -------------*- 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#ifndef FORTRAN_OPTIMIZER_DIALECT_FIROPS_H
10#define FORTRAN_OPTIMIZER_DIALECT_FIROPS_H
11
12#include "flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h"
13#include "flang/Optimizer/Dialect/FIRAttr.h"
14#include "flang/Optimizer/Dialect/FIRType.h"
15#include "flang/Optimizer/Dialect/FirAliasTagOpInterface.h"
16#include "flang/Optimizer/Dialect/FortranVariableInterface.h"
17#include "mlir/Dialect/Arith/IR/Arith.h"
18#include "mlir/Dialect/Func/IR/FuncOps.h"
19#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"
20#include "mlir/Interfaces/LoopLikeInterface.h"
21#include "mlir/Interfaces/SideEffectInterfaces.h"
22
23namespace fir {
24
25class FirEndOp;
26class DoLoopOp;
27class RealAttr;
28
29void buildCmpCOp(mlir::OpBuilder &builder, mlir::OperationState &result,
30 mlir::arith::CmpFPredicate predicate, mlir::Value lhs,
31 mlir::Value rhs);
32unsigned getCaseArgumentOffset(llvm::ArrayRef<mlir::Attribute> cases,
33 unsigned dest);
34DoLoopOp getForInductionVarOwner(mlir::Value val);
35mlir::ParseResult isValidCaseAttr(mlir::Attribute attr);
36mlir::ParseResult parseCmpcOp(mlir::OpAsmParser &parser,
37 mlir::OperationState &result);
38mlir::ParseResult parseSelector(mlir::OpAsmParser &parser,
39 mlir::OperationState &result,
40 mlir::OpAsmParser::UnresolvedOperand &selector,
41 mlir::Type &type);
42
43static constexpr llvm::StringRef getNormalizedLowerBoundAttrName() {
44 return "normalized.lb";
45}
46
49 : public mlir::SideEffects::Resource::Base<DebuggingResource> {
50 mlir::StringRef getName() final { return "DebuggingResource"; }
51};
52
53} // namespace fir
54
55#define GET_OP_CLASSES
56#include "flang/Optimizer/Dialect/FIROps.h.inc"
57
58#endif // FORTRAN_OPTIMIZER_DIALECT_FIROPS_H
Definition: FIRType.h:77
Definition: AbstractConverter.h:31
Model operations which affect global debugging information.
Definition: FIROps.h:49