diff options
Diffstat (limited to 'mlir/lib/Dialect/SPIRV/Serialization')
3 files changed, 15 insertions, 16 deletions
diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp index e60805aca1b..df9cb47a562 100644 --- a/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp @@ -2366,7 +2366,7 @@ Deserializer::processOp<spirv::FunctionCallOp>(ArrayRef<uint32_t> operands) { auto functionName = getFunctionSymbol(functionID); - llvm::SmallVector<Value *, 4> arguments; + SmallVector<Value *, 4> arguments; for (auto operand : llvm::drop_begin(operands, 3)) { auto *value = getValue(operand); if (!value) { diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp index 7db7111e086..4baac53b89f 100644 --- a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp @@ -69,7 +69,7 @@ static LogicalResult encodeInstructionInto(SmallVectorImpl<uint32_t> &binary, /// serialization of the merge block and the continue block, if exists, until /// after all other blocks have been processed. static LogicalResult visitInPrettyBlockOrder( - Block *headerBlock, llvm::function_ref<LogicalResult(Block *)> blockHandler, + Block *headerBlock, function_ref<LogicalResult(Block *)> blockHandler, bool skipHeader = false, ArrayRef<Block *> skipBlocks = {}) { llvm::df_iterator_default_set<Block *, 4> doneBlocks; doneBlocks.insert(skipBlocks.begin(), skipBlocks.end()); @@ -301,7 +301,7 @@ private: /// instruction if this is a SPIR-V selection/loop header block. LogicalResult processBlock(Block *block, bool omitLabel = false, - llvm::function_ref<void()> actionBeforeTerminator = nullptr); + function_ref<void()> actionBeforeTerminator = nullptr); /// Emits OpPhi instructions for the given block if it has block arguments. LogicalResult emitPhiForBlockArguments(Block *block); @@ -457,7 +457,7 @@ private: /// placed inside `functions`) here. And then after emitting all blocks, we /// replace the dummy <id> 0 with the real result <id> by overwriting /// `functions[offset]`. - DenseMap<Value *, llvm::SmallVector<size_t, 1>> deferredPhiValues; + DenseMap<Value *, SmallVector<size_t, 1>> deferredPhiValues; }; } // namespace @@ -1341,7 +1341,7 @@ uint32_t Serializer::getOrCreateBlockID(Block *block) { LogicalResult Serializer::processBlock(Block *block, bool omitLabel, - llvm::function_ref<void()> actionBeforeTerminator) { + function_ref<void()> actionBeforeTerminator) { LLVM_DEBUG(llvm::dbgs() << "processing block " << block << ":\n"); LLVM_DEBUG(block->print(llvm::dbgs())); LLVM_DEBUG(llvm::dbgs() << '\n'); @@ -1773,7 +1773,7 @@ Serializer::processOp<spirv::FunctionCallOp>(spirv::FunctionCallOp op) { auto funcName = op.callee(); uint32_t resTypeID = 0; - llvm::SmallVector<Type, 1> resultTypes(op.getResultTypes()); + SmallVector<Type, 1> resultTypes(op.getResultTypes()); if (failed(processType(op.getLoc(), (resultTypes.empty() ? getVoidType() : resultTypes[0]), resTypeID))) { diff --git a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp index 655f559b765..e9b4f23cca4 100644 --- a/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp @@ -80,7 +80,7 @@ static TranslateToMLIRRegistration fromBinary( // Serialization registration //===----------------------------------------------------------------------===// -LogicalResult serializeModule(ModuleOp module, llvm::raw_ostream &output) { +LogicalResult serializeModule(ModuleOp module, raw_ostream &output) { if (!module) return failure(); @@ -105,7 +105,7 @@ LogicalResult serializeModule(ModuleOp module, llvm::raw_ostream &output) { } static TranslateFromMLIRRegistration - toBinary("serialize-spirv", [](ModuleOp module, llvm::raw_ostream &output) { + toBinary("serialize-spirv", [](ModuleOp module, raw_ostream &output) { return serializeModule(module, output); }); @@ -113,8 +113,8 @@ static TranslateFromMLIRRegistration // Round-trip registration //===----------------------------------------------------------------------===// -LogicalResult roundTripModule(llvm::SourceMgr &sourceMgr, - llvm::raw_ostream &output, MLIRContext *context) { +LogicalResult roundTripModule(llvm::SourceMgr &sourceMgr, raw_ostream &output, + MLIRContext *context) { // Parse an MLIR module from the source manager. auto srcModule = OwningModuleRef(parseSourceFile(sourceMgr, context)); if (!srcModule) @@ -147,9 +147,8 @@ LogicalResult roundTripModule(llvm::SourceMgr &sourceMgr, return mlir::success(); } -static TranslateRegistration - roundtrip("test-spirv-roundtrip", - [](llvm::SourceMgr &sourceMgr, llvm::raw_ostream &output, - MLIRContext *context) { - return roundTripModule(sourceMgr, output, context); - }); +static TranslateRegistration roundtrip( + "test-spirv-roundtrip", + [](llvm::SourceMgr &sourceMgr, raw_ostream &output, MLIRContext *context) { + return roundTripModule(sourceMgr, output, context); + }); |

