1 //===- AffineStructuresParser.h - Parser for AffineStructures ---*- 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 // This file defines helper functions to parse AffineStructures from 10 // StringRefs. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef MLIR_UNITTEST_ANALYSIS_AFFINESTRUCTURESPARSER_H 15 #define MLIR_UNITTEST_ANALYSIS_AFFINESTRUCTURESPARSER_H 16 17 #include "mlir/Dialect/Affine/Analysis/AffineStructures.h" 18 #include "mlir/Support/LogicalResult.h" 19 20 namespace mlir { 21 22 /// This parses a single IntegerSet to an MLIR context and transforms it to 23 /// IntegerPolyhedron if it was valid. If not, a failure is returned. If the 24 /// passed `str` has additional tokens that were not part of the IntegerSet, a 25 /// failure is returned. Diagnostics are printed on failure if 26 /// `printDiagnosticInfo` is true. 27 28 FailureOr<presburger::IntegerPolyhedron> 29 parseIntegerSetToFAC(llvm::StringRef, MLIRContext *context, 30 bool printDiagnosticInfo = true); 31 32 } // namespace mlir 33 34 #endif // MLIR_UNITTEST_ANALYSIS_AFFINESTRUCTURESPARSER_H 35