Skip to content

Commit f6a9282

Browse files
authored
Bump llvm (#267)
* Bump llvm * Fix polygeist-opt tests * Do not use opaque pointers * Do not return null but ValueCategory() for void function result * Fix cgeist tests * Fix eraseArgument API usage * clang format
1 parent fc15676 commit f6a9282

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+617
-634
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/lib)
2222
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2323
project(polygeist LANGUAGES CXX C)
2424

25-
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
25+
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
2626

2727
message(STATUS "Searching for MLIRConfig.cmake in: ${MLIR_DIR}")
2828
find_package(MLIR REQUIRED CONFIG)

include/polygeist/BarrierUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "mlir/Dialect/Func/IR/FuncOps.h"
1414
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
1515
#include "mlir/Dialect/MemRef/IR/MemRef.h"
16-
#include "mlir/Dialect/SCF/SCF.h"
16+
#include "mlir/Dialect/SCF/IR/SCF.h"
1717
#include "mlir/IR/Block.h"
1818
#include "polygeist/Ops.h"
1919
#include "llvm/ADT/SetVector.h"

include/polygeist/Ops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "mlir/Dialect/Affine/IR/AffineOps.h"
1313
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
14-
#include "mlir/Dialect/SCF/SCF.h"
14+
#include "mlir/Dialect/SCF/IR/SCF.h"
1515
#include "mlir/IR/BuiltinTypes.h"
1616
#include "mlir/IR/Dialect.h"
1717
#include "mlir/IR/Matchers.h"
@@ -25,7 +25,7 @@
2525
#include "polygeist/PolygeistOps.h.inc"
2626

2727
#include "mlir/Dialect/Affine/IR/AffineOps.h"
28-
#include "mlir/Dialect/SCF/SCF.h"
28+
#include "mlir/Dialect/SCF/IR/SCF.h"
2929
#include "mlir/IR/Matchers.h"
3030
#include "mlir/IR/PatternMatch.h"
3131
#include "llvm/Support/CommandLine.h"

include/polygeist/Passes/Passes.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ def ConvertPolygeistToLLVM : Pass<"convert-polygeist-to-llvm", "mlir::ModuleOp">
124124
/*default=*/"false",
125125
"Replace FuncOp's MemRef arguments with bare pointers to the MemRef "
126126
"element types">,
127-
Option<"emitCWrappers", "emit-c-wrappers", "bool", /*default=*/"false",
128-
"Emit wrappers for C-compatible pointer-to-struct memref "
129-
"descriptors">,
130127
Option<"indexBitwidth", "index-bitwidth", "unsigned",
131128
/*default=kDeriveIndexBitwidthFromDataLayout*/"0",
132129
"Bitwidth of the index type, 0 to use size of machine word">,

include/polygeist/Passes/Utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include "mlir/Dialect/Affine/IR/AffineOps.h"
4-
#include "mlir/Dialect/SCF/SCF.h"
4+
#include "mlir/Dialect/SCF/IR/SCF.h"
55
#include "mlir/IR/BlockAndValueMapping.h"
66
#include "mlir/IR/IntegerSet.h"
77

@@ -96,13 +96,13 @@ static inline mlir::Region &getThenRegion(mlir::scf::IfOp op) {
9696
return op.getThenRegion();
9797
}
9898
static inline mlir::Region &getThenRegion(mlir::AffineIfOp op) {
99-
return op.thenRegion();
99+
return op.getThenRegion();
100100
}
101101
static inline mlir::Region &getElseRegion(mlir::scf::IfOp op) {
102102
return op.getElseRegion();
103103
}
104104
static inline mlir::Region &getElseRegion(mlir::AffineIfOp op) {
105-
return op.elseRegion();
105+
return op.getElseRegion();
106106
}
107107

108108
static inline mlir::scf::YieldOp getThenYield(mlir::scf::IfOp op) {
@@ -135,5 +135,5 @@ static inline bool hasElse(mlir::scf::IfOp op) {
135135
return op.getElseRegion().getBlocks().size() > 0;
136136
}
137137
static inline bool hasElse(mlir::AffineIfOp op) {
138-
return op.elseRegion().getBlocks().size() > 0;
138+
return op.getElseRegion().getBlocks().size() > 0;
139139
}

include/polygeist/PolygeistOps.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def SubIndexOp : Polygeist_Op<"subindex", [
6161
let hasCanonicalizer = 1;
6262

6363
let extraClassDeclaration = [{
64-
::mlir::Value getViewSource() { return source(); }
64+
::mlir::Value getViewSource() { return getSource(); }
6565
}];
6666
}
6767

@@ -91,7 +91,7 @@ def Memref2PointerOp : Polygeist_Op<"memref2pointer", [
9191
let hasCanonicalizer = 1;
9292

9393
let extraClassDeclaration = [{
94-
::mlir::Value getViewSource() { return source(); }
94+
::mlir::Value getViewSource() { return getSource(); }
9595
}];
9696
}
9797

@@ -107,7 +107,7 @@ def Pointer2MemrefOp : Polygeist_Op<"pointer2memref", [
107107
let hasCanonicalizer = 1;
108108

109109
let extraClassDeclaration = [{
110-
::mlir::Value getViewSource() { return source(); }
110+
::mlir::Value getViewSource() { return getSource(); }
111111
}];
112112
}
113113

lib/polygeist/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ MLIRPolygeistOpsIncGen
1010

1111
LINK_LIBS PUBLIC
1212
MLIRIR
13-
MLIRMemRef
13+
MLIRMemRefDialect
1414
)
1515
add_subdirectory(Passes)

0 commit comments

Comments
 (0)