Skip to content

Commit 4b70b6f

Browse files
igorban-inteligcbot
authored andcommitted
Refactor GenXOpts pass-names
.
1 parent 5d2598f commit 4b70b6f

File tree

64 files changed

+151
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+151
-142
lines changed

IGC/VectorCompiler/lib/GenXOpts/CMAnalysis/InstructionSimplifyGenX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SPDX-License-Identifier: MIT
4444

4545
#include "Probe/Assertion.h"
4646

47-
#define DEBUG_TYPE "genx-simplify"
47+
#define DEBUG_TYPE "GenXSimplify"
4848

4949
using namespace llvm;
5050

@@ -505,10 +505,10 @@ bool GenXSimplify::runOnFunction(Function &F) {
505505
}
506506

507507
char GenXSimplify::ID = 0;
508-
INITIALIZE_PASS_BEGIN(GenXSimplify, "genx-simplify",
508+
INITIALIZE_PASS_BEGIN(GenXSimplify, "GenXSimplify",
509509
"simplify genx specific instructions", false, false)
510510
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
511-
INITIALIZE_PASS_END(GenXSimplify, "genx-simplify",
511+
INITIALIZE_PASS_END(GenXSimplify, "GenXSimplify",
512512
"simplify genx specific instructions", false, false)
513513

514514
FunctionPass *llvm::createGenXSimplifyPass() { return new GenXSimplify; }

IGC/VectorCompiler/lib/GenXOpts/CMTrans/CMABI.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ SPDX-License-Identifier: MIT
8484
#include <unordered_set>
8585
#include <vector>
8686

87-
#define DEBUG_TYPE "cmabi"
87+
#define DEBUG_TYPE "CMABI"
8888

8989
using namespace llvm;
9090

@@ -317,10 +317,10 @@ struct CMABI : public CallGraphSCCPass {
317317
} // namespace
318318

319319
char CMABIAnalysis::ID = 0;
320-
INITIALIZE_PASS_BEGIN(CMABIAnalysis, "cmabi-analysis",
320+
INITIALIZE_PASS_BEGIN(CMABIAnalysis, "CMABIAnalysis",
321321
"helper analysis pass to get info for CMABI", false, true)
322322
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
323-
INITIALIZE_PASS_END(CMABIAnalysis, "cmabi-analysis",
323+
INITIALIZE_PASS_END(CMABIAnalysis, "CMABIAnalysis",
324324
"Fix ABI issues for the genx backend", false, true)
325325

326326
bool CMABIAnalysis::runOnModule(Module &M) {
@@ -936,10 +936,12 @@ void CMABI::diagnoseOverlappingArgs(CallInst *CI)
936936
}
937937

938938
char CMABI::ID = 0;
939-
INITIALIZE_PASS_BEGIN(CMABI, "cmabi", "Fix ABI issues for the genx backend", false, false)
939+
INITIALIZE_PASS_BEGIN(CMABI, "CMABI", "Fix ABI issues for the genx backend",
940+
false, false)
940941
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
941942
INITIALIZE_PASS_DEPENDENCY(CMABIAnalysis)
942-
INITIALIZE_PASS_END(CMABI, "cmabi", "Fix ABI issues for the genx backend", false, false)
943+
INITIALIZE_PASS_END(CMABI, "CMABI", "Fix ABI issues for the genx backend",
944+
false, false)
943945

944946
Pass *llvm::createCMABIPass() { return new CMABI(); }
945947

@@ -1005,13 +1007,13 @@ struct CMLowerVLoadVStore : public FunctionPass {
10051007

10061008
char CMLowerVLoadVStore::ID = 0;
10071009
INITIALIZE_PASS_BEGIN(CMLowerVLoadVStore, "CMLowerVLoadVStore",
1008-
"Lower CM reference vector loads and stores", false, false)
1010+
"Lower CM reference vector loads and stores", false,
1011+
false)
10091012
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
10101013
INITIALIZE_PASS_DEPENDENCY(PostDominatorTreeWrapperPass)
10111014
INITIALIZE_PASS_END(CMLowerVLoadVStore, "CMLowerVLoadVStore",
10121015
"Lower CM reference vector loads and stores", false, false)
10131016

1014-
10151017
bool CMLowerVLoadVStore::runOnFunction(Function &F) {
10161018
bool Changed = false;
10171019
Changed |= promoteAllocas(F);

IGC/VectorCompiler/lib/GenXOpts/CMTrans/CMImpParam.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SPDX-License-Identifier: MIT
100100
///
101101
//===----------------------------------------------------------------------===//
102102

103-
#define DEBUG_TYPE "cmimpparam"
103+
#define DEBUG_TYPE "CMImpParam"
104104

105105
#include "vc/GenXOpts/GenXOpts.h"
106106
#include "vc/Utils/GenX/KernelInfo.h"
@@ -1198,14 +1198,16 @@ CMImpParam::processKernelParameters(Function *F,
11981198
}
11991199

12001200
char CMImpParam::ID = 0;
1201-
INITIALIZE_PASS_BEGIN(CMImpParam, "cmimpparam",
1201+
INITIALIZE_PASS_BEGIN(CMImpParam, "CMImpParam",
12021202
"Transformations required to support implicit arguments",
12031203
false, false)
12041204
INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
1205-
INITIALIZE_PASS_END(CMImpParam, "cmimpparam",
1205+
INITIALIZE_PASS_END(CMImpParam, "CMImpParam",
12061206
"Transformations required to support implicit arguments",
12071207
false, false)
12081208

1209-
Pass *llvm::createCMImpParamPass(bool HasPayloadInMemory) {
1209+
namespace llvm {
1210+
Pass *createCMImpParamPass(bool HasPayloadInMemory) {
12101211
return new CMImpParam{HasPayloadInMemory};
12111212
}
1213+
} // namespace llvm

IGC/VectorCompiler/lib/GenXOpts/CMTrans/CMKernelArgOffset.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ SPDX-License-Identifier: MIT
8484
///
8585
//===----------------------------------------------------------------------===//
8686

87-
#define DEBUG_TYPE "cmkernelargoffset"
88-
8987
#include <llvmWrapper/IR/Type.h>
9088
#include "llvmWrapper/Support/Alignment.h"
9189

@@ -107,6 +105,8 @@ SPDX-License-Identifier: MIT
107105

108106
#include "Probe/Assertion.h"
109107

108+
#define DEBUG_TYPE "CMKernelArgOffset"
109+
110110
using namespace llvm;
111111

112112
namespace llvm {
@@ -175,15 +175,17 @@ class CMKernelArgOffset : public ModulePass {
175175

176176
char CMKernelArgOffset::ID = 0;
177177

178-
INITIALIZE_PASS_BEGIN(CMKernelArgOffset, "cmkernelargoffset",
178+
INITIALIZE_PASS_BEGIN(CMKernelArgOffset, "CMKernelArgOffset",
179179
"CM kernel arg offset determination", false, false)
180-
INITIALIZE_PASS_END(CMKernelArgOffset, "cmkernelargoffset",
180+
INITIALIZE_PASS_END(CMKernelArgOffset, "CMKernelArgOffset",
181181
"CM kernel arg offset determination", false, false)
182182

183-
Pass *llvm::createCMKernelArgOffsetPass(unsigned GrfByteSize,
184-
bool UseBindlessImages) {
183+
namespace llvm {
184+
Pass *createCMKernelArgOffsetPass(unsigned GrfByteSize,
185+
bool UseBindlessImages) {
185186
return new CMKernelArgOffset(GrfByteSize, UseBindlessImages);
186187
}
188+
} // namespace llvm
187189

188190
// Check whether there is an input/output argument attribute.
189191
static bool canReorderArguments(const vc::KernelMetadata &KM) {

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXBIFFlagCtrlResolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ SPDX-License-Identifier: MIT
2020
#include <map>
2121

2222
using namespace llvm;
23+
#define DEBUG_TYPE "GenXBIFFlagCtrlResolution"
2324

2425
#define BIF_FLAG_CONTROL(BIF_FLAG_TYPE, BIF_FLAG_NAME) \
2526
BIF_FLAG_CTRL_N_S(BIF_FLAG_NAME),
@@ -145,7 +146,6 @@ bool GenXBIFFlagCtrlResolution::replace(T Value, GlobalVariable *GV) {
145146

146147
char GenXBIFFlagCtrlResolution::ID = 0;
147148

148-
149149
INITIALIZE_PASS_BEGIN(GenXBIFFlagCtrlResolution, "GenXBIFFlagCtrlResolution",
150150
"GenXBIFFlagCtrlResolution", false, false)
151151

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXCloneIndirectFunctions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*========================== begin_copyright_notice ============================
22
3-
Copyright (C) 2022-2023 Intel Corporation
3+
Copyright (C) 2022-2024 Intel Corporation
44
55
SPDX-License-Identifier: MIT
66
@@ -65,6 +65,7 @@ SPDX-License-Identifier: MIT
6565
#include <llvm/Transforms/Utils/Cloning.h>
6666

6767
using namespace llvm;
68+
#define DEBUG_TYPE "GenXCloneIndirectFunctions"
6869

6970
static cl::opt<bool> EnableCloneIndirectFunctions(
7071
"vc-enable-clone-indirect-functions",

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXPrintfResolution.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ SPDX-License-Identifier: MIT
5454
#include <sstream>
5555
#include <vector>
5656

57+
#define DEBUG_TYPE "GenXPrintfResolution"
58+
5759
using namespace llvm;
5860
using namespace vc;
5961
using namespace vc::bif::printf;

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXTranslateIntrinsics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SPDX-License-Identifier: MIT
2525
#include <llvm/Pass.h>
2626
#include <llvm/Support/Debug.h>
2727

28-
#define DEBUG_TYPE "genx-translate-intrinsics"
28+
#define DEBUG_TYPE "GenXTranslateIntrinsics"
2929

3030
using namespace llvm;
3131

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXTranslateSPIRVBuiltins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SPDX-License-Identifier: MIT
3636
#include <llvm/Pass.h>
3737
#include <optional>
3838

39-
#define DEBUG_TYPE "GENX_SPIRV_BUILTINS"
39+
#define DEBUG_TYPE "GenXTranslateSPIRVBuiltins"
4040

4141
using namespace llvm;
4242

IGC/VectorCompiler/lib/GenXOpts/CMTrans/GenXTypeLegalization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SPDX-License-Identifier: MIT
3232
#include <llvm/IR/InstVisitor.h>
3333
#include <llvm/Pass.h>
3434

35-
#define DEBUG_TYPE "GENX_TYPE_LEGALIZATION"
35+
#define DEBUG_TYPE "GenXTypeLegalization"
3636

3737
using namespace llvm;
3838

0 commit comments

Comments
 (0)