Skip to content

Commit 7d2f11f

Browse files
Fix merge
Signed-off-by: Tsang, Whitney <[email protected]>
1 parent ab74e81 commit 7d2f11f

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

+1073
-1072
lines changed

mlir-sycl/include/mlir/Dialect/SYCL/IR/SYCLOps.td

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ class SYCLMethodOpInterfaceImpl<
6161
}};
6262
static ::mlir::TypeID getTypeID() { return ::mlir::sycl::}] # type # [{::getTypeID(); }
6363
static constexpr llvm::ArrayRef<llvm::StringLiteral> getMethodNames() { return methods; }
64-
::mlir::Type getBaseType() { return BaseType(); }
65-
llvm::StringRef getMangledFunctionName() { return MangledFunctionName(); }
66-
llvm::StringRef getFunctionName() { return FunctionName(); }
67-
llvm::StringRef getTypeName() { return TypeName(); }
6864
}];
6965

7066
let extraClassDefinition = [{
@@ -189,13 +185,13 @@ def SYCLCallOp : SYCL_Op<"call", []> {
189185
"::llvm::StringRef":$MangledName,
190186
"::mlir::ValueRange":$Args), [{
191187
odsState.addOperands(Args);
192-
if (Type.hasValue()) {
193-
odsState.addAttribute(TypeAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), Type.getValue()));
188+
if (Type.has_value()) {
189+
odsState.addAttribute(TypeAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), Type.value()));
194190
}
195-
odsState.addAttribute(FunctionAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), Function));
196-
odsState.addAttribute(MangledNameAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), MangledName));
197-
if (result.hasValue()) {
198-
odsState.addTypes(result.getValue());
191+
odsState.addAttribute(getFunctionAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), Function));
192+
odsState.addAttribute(getMangledNameAttrName(odsState.name), ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), MangledName));
193+
if (result.has_value()) {
194+
odsState.addTypes(result.value());
199195
}
200196
}]>
201197
];

mlir-sycl/lib/Conversion/SYCLToLLVM/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ add_mlir_conversion_library(MLIRSYCLToLLVM
1111
MLIRSYCLConversionPassIncGen
1212

1313
LINK_LIBS PUBLIC
14-
MLIRArithmeticToLLVM
14+
MLIRArithToLLVM
1515
MLIRFuncToLLVM
1616
MLIRIR
1717
MLIRLLVMCommonConversion

mlir-sycl/lib/Conversion/SYCLToLLVM/SYCLToLLVM.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ static Optional<Type> convertRangeOrIDTy(unsigned dimNum, StringRef name,
153153
if (!convertedTy.isInitialized()) {
154154
auto arrayTy =
155155
getArrayTy(converter.getContext(), dimNum, converter.getIndexType());
156-
if (!arrayTy.hasValue())
156+
if (!arrayTy.has_value())
157157
return llvm::None;
158-
if (failed(convertedTy.setBody(arrayTy.getValue(), /*isPacked=*/false)))
158+
if (failed(convertedTy.setBody(arrayTy.value(), /*isPacked=*/false)))
159159
return llvm::None;
160160
}
161161
return convertedTy;
@@ -236,8 +236,8 @@ class CallPattern final : public ConvertOpToLLVMPattern<sycl::SYCLCallOp> {
236236

237237
bool producesResult = op.getNumResults() == 1;
238238
func::CallOp funcCall = builder.genCall(
239-
op.MangledName(),
240-
producesResult ? TypeRange(op.result().getType()) : TypeRange(),
239+
op.getMangledName(),
240+
producesResult ? TypeRange(op.getResult().getType()) : TypeRange(),
241241
op.getOperands(), module);
242242

243243
rewriter.replaceOp(op.getOperation(),
@@ -274,14 +274,14 @@ class CastPattern final : public ConvertOpToLLVMPattern<sycl::SYCLCastOp> {
274274
LLVM_DEBUG(llvm::dbgs() << "CastPattern: Rewriting op: "; op.dump();
275275
llvm::dbgs() << "\n");
276276

277-
assert(op.source().getType().isa<MemRefType>() &&
277+
assert(op.getSource().getType().isa<MemRefType>() &&
278278
"The cast source type should be a memref type");
279-
assert(op.result().getType().isa<MemRefType>() &&
279+
assert(op.getResult().getType().isa<MemRefType>() &&
280280
"The result source type should be a memref type");
281281

282282
// Ensure the input and result types are legal.
283-
auto srcType = op.source().getType().cast<MemRefType>();
284-
auto resType = op.result().getType().cast<MemRefType>();
283+
auto srcType = op.getSource().getType().cast<MemRefType>();
284+
auto resType = op.getResult().getType().cast<MemRefType>();
285285

286286
if (!isConvertibleAndHasIdentityMaps(srcType) ||
287287
!isConvertibleAndHasIdentityMaps(resType))
@@ -291,7 +291,7 @@ class CastPattern final : public ConvertOpToLLVMPattern<sycl::SYCLCastOp> {
291291
// type of those pointers in the results memref.
292292
Location loc = op.getLoc();
293293
LLVMBuilder builder(rewriter, loc);
294-
MemRefDescriptor srcMemRefDesc(opAdaptor.source());
294+
MemRefDescriptor srcMemRefDesc(opAdaptor.getSource());
295295
Value allocatedPtr = builder.genBitcast(
296296
getElementPtrType(resType), srcMemRefDesc.allocatedPtr(rewriter, loc));
297297
Value alignedPtr = builder.genBitcast(
@@ -344,7 +344,7 @@ class ConstructorPattern final
344344

345345
ModuleOp module = op.getOperation()->getParentOfType<ModuleOp>();
346346
FuncBuilder builder(rewriter, op.getLoc());
347-
func::CallOp funcCall = builder.genCall(op.MangledName(), TypeRange(),
347+
func::CallOp funcCall = builder.genCall(op.getMangledName(), TypeRange(),
348348
op.getOperands(), module);
349349
rewriter.eraseOp(op);
350350
(void)funcCall;

mlir-sycl/lib/Dialect/IR/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (TARGET MLIRArithmetic)
1313
)
1414
else()
1515
set(MLIR_LIBS_TO_LINK
16-
MLIRArithmeticDialect
16+
MLIRArithDialect
1717
MLIRCallInterfaces
1818
MLIRCastInterfaces
1919
MLIRControlFlowInterfaces

polygeist/include/polygeist/BarrierUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "mlir/IR/Block.h"
1818
#include "polygeist/Ops.h"
1919
#include "llvm/ADT/SetVector.h"
20-
#include <mlir/Dialect/Arithmetic/IR/Arithmetic.h>
20+
#include <mlir/Dialect/Arith/IR/Arith.h>
2121

2222
std::pair<mlir::Block *, mlir::Block::iterator>
2323
findInsertionPointAfterLoopOperands(mlir::scf::ParallelOp op);

polygeist/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

0 commit comments

Comments
 (0)