1 //===- AffineStructuresParser.cpp - 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 #include "./AffineStructuresParser.h" 10 #include "mlir/AsmParser/AsmParser.h" 11 #include "mlir/IR/IntegerSet.h" 12 13 using namespace mlir; 14 using namespace presburger; 15 16 FailureOr<IntegerPolyhedron> parseIntegerSetToFAC(llvm::StringRef str,MLIRContext * context,bool printDiagnosticInfo)17mlir::parseIntegerSetToFAC(llvm::StringRef str, MLIRContext *context, 18 bool printDiagnosticInfo) { 19 IntegerSet set = parseIntegerSet(str, context, printDiagnosticInfo); 20 21 if (!set) 22 return failure(); 23 24 return FlatAffineValueConstraints(set); 25 } 26