Skip to content

Commit

Permalink
Renaming SPIRVLowerOCLBlocks pass to SPIRVLowerSPIRBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySotkin committed Aug 10, 2018
1 parent c777c78 commit 6cbb042
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions include/LLVMSPIRVLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void initializeOCL21ToSPIRVPass(PassRegistry &);
void initializeOCLTypeToSPIRVPass(PassRegistry &);
void initializeSPIRVLowerBoolPass(PassRegistry &);
void initializeSPIRVLowerConstExprPass(PassRegistry &);
void initializeSPIRVLowerOCLBlocksPass(PassRegistry &);
void initializeSPIRVLowerSPIRBlocksPass(PassRegistry &);
void initializeSPIRVLowerMemmovePass(PassRegistry &);
void initializeSPIRVRegularizeLLVMPass(PassRegistry &);
void initializeSPIRVToOCL20Pass(PassRegistry &);
Expand Down Expand Up @@ -133,8 +133,8 @@ ModulePass *createSPIRVLowerBool();
/// Create a pass for lowering constant expressions to instructions.
ModulePass *createSPIRVLowerConstExpr();

/// Create a pass for lowering OCL 2.0 blocks to functions calls.
ModulePass *createSPIRVLowerOCLBlocks();
/// Create a pass for lowering SPIR 2.0 blocks to functions calls.
ModulePass *createSPIRVLowerSPIRBlocks();

/// Create a pass for lowering llvm.memmove to llvm.memcpys with a temporary
/// variable.
Expand Down
2 changes: 1 addition & 1 deletion lib/SPIRV/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ add_llvm_library(LLVMSPIRVLib
OCLUtil.cpp
SPIRVLowerBool.cpp
SPIRVLowerConstExpr.cpp
SPIRVLowerSPIRBlocks.cpp
SPIRVLowerMemmove.cpp
SPIRVLowerOCLBlocks.cpp
SPIRVReader.cpp
SPIRVRegularizeLLVM.cpp
SPIRVToOCL20.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- SPIRVLowerOCLBlocks.cpp - Lower OpenCL blocks ------------*- C++ -*-===//
//===- SPIRVLowerSPIRBlocks.cpp - Lower SPIR 2.0 blocks ---------*- C++ -*-===//
//
// The LLVM/SPIR-V Translator
//
Expand Down Expand Up @@ -33,7 +33,7 @@
//===----------------------------------------------------------------------===//
/// \file
///
/// This file implements lowering of OpenCL blocks to functions.
/// This file implements lowering of SPIR 2.0 blocks to functions.
///
//===----------------------------------------------------------------------===//

Expand Down Expand Up @@ -71,7 +71,7 @@
#include <sstream>
#include <vector>

#define DEBUG_TYPE "spvblocks"
#define DEBUG_TYPE "spv-lower-spir-blocks"

using namespace llvm;
using namespace SPIRV;
Expand All @@ -92,10 +92,10 @@ namespace SPIRV {
/// Propagates block_func to each spir_get_block_invoke through def-use chain of
/// spir_block_bind, so that
/// ret = block_func(context, args)
class SPIRVLowerOCLBlocks : public ModulePass {
class SPIRVLowerSPIRBlocks : public ModulePass {
public:
SPIRVLowerOCLBlocks() : ModulePass(ID), M(nullptr) {
initializeSPIRVLowerOCLBlocksPass(*PassRegistry::getPassRegistry());
SPIRVLowerSPIRBlocks() : ModulePass(ID), M(nullptr) {
initializeSPIRVLowerSPIRBlocksPass(*PassRegistry::getPassRegistry());
}

void getAnalysisUsage(AnalysisUsage &AU) const override {
Expand Down Expand Up @@ -611,17 +611,17 @@ class SPIRVLowerOCLBlocks : public ModulePass {
}
};

char SPIRVLowerOCLBlocks::ID = 0;
char SPIRVLowerSPIRBlocks::ID = 0;
} // namespace SPIRV

INITIALIZE_PASS_BEGIN(SPIRVLowerOCLBlocks, "spvblocks",
"SPIR-V lower OCL blocks", false, false)
INITIALIZE_PASS_BEGIN(SPIRVLowerSPIRBlocks, "spv-lower-spir-blocks",
"SPIR-V lower SPIR blocks", false, false)
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
INITIALIZE_PASS_END(SPIRVLowerOCLBlocks, "spvblocks", "SPIR-V lower OCL blocks",
false, false)
INITIALIZE_PASS_END(SPIRVLowerSPIRBlocks, "spv-lower-spir-blocks",
"SPIR-V lower SPIR blocks", false, false)

ModulePass *llvm::createSPIRVLowerOCLBlocks() {
return new SPIRVLowerOCLBlocks();
ModulePass *llvm::createSPIRVLowerSPIRBlocks() {
return new SPIRVLowerSPIRBlocks();
}
2 changes: 1 addition & 1 deletion lib/SPIRV/SPIRVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ void addPassesForSPIRV(legacy::PassManager &PassMgr) {
PassMgr.add(createPromoteMemoryToRegisterPass());
PassMgr.add(createTransOCLMD());
PassMgr.add(createOCL21ToSPIRV());
PassMgr.add(createSPIRVLowerOCLBlocks());
PassMgr.add(createSPIRVLowerSPIRBlocks());
PassMgr.add(createOCLTypeToSPIRV());
PassMgr.add(createOCL20ToSPIRV());
PassMgr.add(createSPIRVRegularizeLLVM());
Expand Down

0 comments on commit 6cbb042

Please sign in to comment.