aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Target')
-rw-r--r--mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp11
-rw-r--r--mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp8
-rw-r--r--mlir/lib/Target/Wasm/TranslateFromWasm.cpp20
3 files changed, 16 insertions, 23 deletions
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index b851414..f284540 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -357,14 +357,8 @@ static LogicalResult checkImplementationStatus(Operation &op) {
result = todo("priority");
};
auto checkPrivate = [&todo](auto op, LogicalResult &result) {
- if constexpr (std::is_same_v<std::decay_t<decltype(op)>, omp::TargetOp>) {
- // Privatization is supported only for included target tasks.
- if (!op.getPrivateVars().empty() && op.getNowait())
- result = todo("privatization for deferred target tasks");
- } else {
- if (!op.getPrivateVars().empty() || op.getPrivateSyms())
- result = todo("privatization");
- }
+ if (!op.getPrivateVars().empty() || op.getPrivateSyms())
+ result = todo("privatization");
};
auto checkReduction = [&todo](auto op, LogicalResult &result) {
if (isa<omp::TeamsOp>(op))
@@ -451,7 +445,6 @@ static LogicalResult checkImplementationStatus(Operation &op) {
checkDevice(op, result);
checkInReduction(op, result);
checkIsDevicePtr(op, result);
- checkPrivate(op, result);
})
.Default([](Operation &) {
// Assume all clauses for an operation can be translated unless they are
diff --git a/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp b/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
index d9ad8fb..6492708 100644
--- a/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+++ b/mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
@@ -702,8 +702,8 @@ spirv::Deserializer::processGraphEntryPointARM(ArrayRef<uint32_t> operands) {
// RAII guard to reset the insertion point to previous value when done.
OpBuilder::InsertionGuard insertionGuard(opBuilder);
opBuilder.setInsertionPoint(graphARM);
- opBuilder.create<spirv::GraphEntryPointARMOp>(
- unknownLoc, SymbolRefAttr::get(opBuilder.getContext(), name),
+ spirv::GraphEntryPointARMOp::create(
+ opBuilder, unknownLoc, SymbolRefAttr::get(opBuilder.getContext(), name),
opBuilder.getArrayAttr(interface));
return success();
@@ -736,7 +736,7 @@ spirv::Deserializer::processGraphARM(ArrayRef<uint32_t> operands) {
std::string graphName = getGraphSymbol(graphID);
auto graphOp =
- opBuilder.create<spirv::GraphARMOp>(unknownLoc, graphName, graphType);
+ spirv::GraphARMOp::create(opBuilder, unknownLoc, graphName, graphType);
curGraph = graphMap[graphID] = graphOp;
Block *entryBlock = graphOp.addEntryBlock();
LLVM_DEBUG({
@@ -844,7 +844,7 @@ spirv::Deserializer::processOpGraphSetOutputARM(ArrayRef<uint32_t> operands) {
LogicalResult
spirv::Deserializer::processGraphEndARM(ArrayRef<uint32_t> operands) {
// Create GraphOutputsARM instruction.
- opBuilder.create<spirv::GraphOutputsARMOp>(unknownLoc, graphOutputs);
+ spirv::GraphOutputsARMOp::create(opBuilder, unknownLoc, graphOutputs);
// Process OpGraphEndARM.
if (!operands.empty()) {
diff --git a/mlir/lib/Target/Wasm/TranslateFromWasm.cpp b/mlir/lib/Target/Wasm/TranslateFromWasm.cpp
index 366ba8f..048e964 100644
--- a/mlir/lib/Target/Wasm/TranslateFromWasm.cpp
+++ b/mlir/lib/Target/Wasm/TranslateFromWasm.cpp
@@ -406,7 +406,7 @@ private:
auto returnOperands = popOperands(resTypes);
if (failed(returnOperands))
return failure();
- builder.create<BlockReturnOp>(opLoc, *returnOperands);
+ BlockReturnOp::create(builder, opLoc, *returnOperands);
LDBG() << "end of parsing of a block";
return bodyParsingRes->endingByte;
}
@@ -1000,7 +1000,7 @@ parsed_inst_t ExpressionParser::parseBlockLikeOp(OpBuilder &builder) {
builder.createBlock(curRegion, curRegion->end(), resTypes, locations);
builder.setInsertionPointToEnd(curBlock);
auto blockOp =
- builder.create<OpToCreate>(*currentOpLoc, *inputOps, successor);
+ OpToCreate::create(builder, *currentOpLoc, *inputOps, successor);
auto *blockBody = blockOp.createBlock();
if (failed(parseBlockContent(builder, blockBody, resTypes, *opLoc, blockOp)))
return failure();
@@ -1047,8 +1047,8 @@ inline parsed_inst_t ExpressionParser::parseSpecificInstruction<
auto *successor =
builder.createBlock(curRegion, curRegion->end(), resTypes, locations);
builder.setInsertionPointToEnd(curBlock);
- auto ifOp = builder.create<IfOp>(*currentOpLoc, conditionValue->front(),
- *inputOps, successor);
+ auto ifOp = IfOp::create(builder, *currentOpLoc, conditionValue->front(),
+ *inputOps, successor);
auto *ifEntryBlock = ifOp.createIfBlock();
constexpr auto ifElseFilter =
ByteSequence<WasmBinaryEncoding::endByte,
@@ -1091,9 +1091,9 @@ inline parsed_inst_t ExpressionParser::parseSpecificInstruction<
auto branchArgs = popOperands(inputTypes);
if (failed(branchArgs))
return failure();
- builder.create<BranchIfOp>(*currentOpLoc, condition->front(),
- builder.getUI32IntegerAttr(*level), *branchArgs,
- elseBlock);
+ BranchIfOp::create(builder, *currentOpLoc, condition->front(),
+ builder.getUI32IntegerAttr(*level), *branchArgs,
+ elseBlock);
builder.setInsertionPointToStart(elseBlock);
return {*branchArgs};
}
@@ -1115,7 +1115,7 @@ ExpressionParser::parseSpecificInstruction<WasmBinaryEncoding::OpCode::call>(
if (failed(inOperands))
return failure();
auto callOp =
- builder.create<FuncCallOp>(loc, resTypes, callee.symbol, *inOperands);
+ FuncCallOp::create(builder, loc, resTypes, callee.symbol, *inOperands);
return {callOp.getResults()};
}
@@ -1391,8 +1391,8 @@ inline parsed_inst_t ExpressionParser::buildConvertOp(OpBuilder &builder,
auto operand = popOperands(intype);
if (failed(operand))
return failure();
- auto op = builder.create<opType>(*currentOpLoc, outType, operand->front(),
- extraArgs...);
+ auto op = opType::create(builder, *currentOpLoc, outType, operand->front(),
+ extraArgs...);
LDBG() << "Built operation: " << op;
return {{op.getResult()}};
}