RFC: https://discourse.llvm.org/t/rfc-a-poly-dialect-for-polynomial-arithmetic/73891 This PR implements the minimal work needed to represent the polynomial type such that it can be tested with `lit`. In this PR: - Dialect shell - `Polynomial` data structure needed for folding - Polynomial attributes (`PolynomialAttr` and `RingAttr` which store a polynomial) - `polynomial.polynomial` type - Basic lit tests --------- Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
16 lines
559 B
C++
16 lines
559 B
C++
//===- PolynomialOps.cpp - Polynomial dialect ops ---------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "mlir/Dialect/Polynomial/IR/Polynomial.h"
|
|
|
|
using namespace mlir;
|
|
using namespace mlir::polynomial;
|
|
|
|
#define GET_OP_CLASSES
|
|
#include "mlir/Dialect/Polynomial/IR/Polynomial.cpp.inc"
|