[WIP] Sketching IR and parsing support for affine maps, affine expressions
Run test case:
$ mlir-opt test/IR/parser-affine-map.mlir
test/IR/parser-affine-map.mlir:3:30: error: expect '(' at start of map range
#hello_world2 (i, j) [s0] -> i+s0, j)
^
PiperOrigin-RevId: 202736856
diff --git a/include/mlir/IR/Module.h b/include/mlir/IR/Module.h
index bf77078..7d22efd 100644
--- a/include/mlir/IR/Module.h
+++ b/include/mlir/IR/Module.h
@@ -22,10 +22,13 @@
#ifndef MLIR_IR_MODULE_H
#define MLIR_IR_MODULE_H
+#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Function.h"
-#include <vector>
namespace mlir {
+
+class AffineMap;
+
class Module {
public:
explicit Module();
@@ -33,6 +36,9 @@
// FIXME: wrong representation and API.
std::vector<Function*> functionList;
+ // FIXME: wrong representation and API.
+ // These affine maps are immutable
+ std::vector<const AffineMap *> affineMapList;
void print(raw_ostream &os) const;
void dump() const;