Skip to content

Commit 6033bc8

Browse files
Resolve code formatting mistakes
Signed-off-by: Davide Grohmann <[email protected]> Change-Id: I07c5cad1f3092994af33ebbeda84e2018e03f6b7
1 parent 60ace99 commit 6033bc8

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,14 +1019,15 @@ LogicalResult SPIRVDialect::verifyRegionArgAttribute(Operation *op,
10191019
return verifyRegionAttribute(op->getLoc(), argType, attribute);
10201020
}
10211021

1022-
LogicalResult SPIRVDialect::verifyRegionResultAttribute(Operation *op,
1023-
unsigned regionIndex,
1024-
unsigned resultIndex,
1025-
NamedAttribute attribute) {
1022+
LogicalResult
1023+
SPIRVDialect::verifyRegionResultAttribute(Operation *op, unsigned regionIndex,
1024+
unsigned resultIndex,
1025+
NamedAttribute attribute) {
10261026
auto funcOp = dyn_cast<FunctionOpInterface>(op);
10271027
if (!funcOp)
1028-
return op->emitError("cannot attach SPIR-V attributes to region result which is "
1029-
"not a FunctionOpInterface type");
1030-
return verifyRegionAttribute(
1031-
op->getLoc(), funcOp.getResultTypes()[resultIndex], attribute);
1028+
return op->emitError(
1029+
"cannot attach SPIR-V attributes to region result which is "
1030+
"not a FunctionOpInterface type");
1031+
return verifyRegionAttribute(op->getLoc(),
1032+
funcOp.getResultTypes()[resultIndex], attribute);
10321033
}

mlir/lib/IR/BuiltinTypes.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,11 @@ FunctionType::getWithoutArgsAndResults(const BitVector &argIndices,
185185

186186
unsigned GraphType::getNumInputs() const { return getImpl()->numInputs; }
187187

188-
ArrayRef<Type> GraphType::getInputs() const {
189-
return getImpl()->getInputs();
190-
}
188+
ArrayRef<Type> GraphType::getInputs() const { return getImpl()->getInputs(); }
191189

192190
unsigned GraphType::getNumResults() const { return getImpl()->numResults; }
193191

194-
ArrayRef<Type> GraphType::getResults() const {
195-
return getImpl()->getResults();
196-
}
192+
ArrayRef<Type> GraphType::getResults() const { return getImpl()->getResults(); }
197193

198194
GraphType GraphType::clone(TypeRange inputs, TypeRange results) const {
199195
return get(getContext(), inputs, results);
@@ -215,7 +211,7 @@ GraphType GraphType::getWithArgsAndResults(ArrayRef<unsigned> argIndices,
215211

216212
/// Returns a new function type without the specified arguments and results.
217213
GraphType GraphType::getWithoutArgsAndResults(const BitVector &argIndices,
218-
const BitVector &resultIndices) {
214+
const BitVector &resultIndices) {
219215
SmallVector<Type> argStorage, resultStorage;
220216
TypeRange newArgTypes = filterTypesOut(getInputs(), argIndices, argStorage);
221217
TypeRange newResultTypes =

mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ Serializer::processGraphEntryPointARMOp(spirv::GraphEntryPointARMOp op) {
429429
return success();
430430
}
431431

432-
LogicalResult Serializer::processGraphOutputsARMOp(spirv::GraphOutputsARMOp op) {
432+
LogicalResult
433+
Serializer::processGraphOutputsARMOp(spirv::GraphOutputsARMOp op) {
433434
for (auto [idx, value] : llvm::enumerate(op->getOperands())) {
434435
SmallVector<uint32_t, 2> outputOperands;
435436

mlir/lib/Target/SPIRV/Serialization/Serializer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,8 +1402,9 @@ LogicalResult Serializer::processOperation(Operation *opInst) {
14021402
.Case([&](spirv::GraphEntryPointARMOp op) {
14031403
return processGraphEntryPointARMOp(op);
14041404
})
1405-
.Case(
1406-
[&](spirv::GraphOutputsARMOp op) { return processGraphOutputsARMOp(op); })
1405+
.Case([&](spirv::GraphOutputsARMOp op) {
1406+
return processGraphOutputsARMOp(op);
1407+
})
14071408
.Case([&](spirv::GlobalVariableOp op) {
14081409
return processGlobalVariableOp(op);
14091410
})

0 commit comments

Comments
 (0)