Skip to content

Commit f5ad11a

Browse files
dguzhaevigcbot
authored andcommitted
Remove unused code
Removed unused code from EmitVISA pass.
1 parent 70fded8 commit f5ad11a

File tree

3 files changed

+1
-96
lines changed

3 files changed

+1
-96
lines changed

IGC/Compiler/CISACodeGen/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ set(IGC_BUILD__SRC__CISACodeGen_Common
6161
"${CMAKE_CURRENT_SOURCE_DIR}/PayloadMapping.cpp"
6262
"${CMAKE_CURRENT_SOURCE_DIR}/PositionDepAnalysis.cpp"
6363
"${CMAKE_CURRENT_SOURCE_DIR}/PreRARematFlag.cpp"
64-
"${CMAKE_CURRENT_SOURCE_DIR}/PreRAScheduler.cpp"
6564
"${CMAKE_CURRENT_SOURCE_DIR}/PrepareLoadsStoresPass.cpp"
6665
"${CMAKE_CURRENT_SOURCE_DIR}/PrepareLoadsStoresUtils.cpp"
6766
"${CMAKE_CURRENT_SOURCE_DIR}/PromoteConstantStructs.cpp"
@@ -155,7 +154,6 @@ set(IGC_BUILD__HDR__CISACodeGen_Common
155154
"${CMAKE_CURRENT_SOURCE_DIR}/Platform.hpp"
156155
"${CMAKE_CURRENT_SOURCE_DIR}/PositionDepAnalysis.hpp"
157156
"${CMAKE_CURRENT_SOURCE_DIR}/PreRARematFlag.h"
158-
"${CMAKE_CURRENT_SOURCE_DIR}/PreRAScheduler.hpp"
159157
"${CMAKE_CURRENT_SOURCE_DIR}/PrepareLoadsStoresPass.h"
160158
"${CMAKE_CURRENT_SOURCE_DIR}/PrepareLoadsStoresUtils.h"
161159
"${CMAKE_CURRENT_SOURCE_DIR}/PromoteConstantStructs.hpp"

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ AbortOnSpill("abort-on-spill",
134134
cl::Hidden);
135135

136136
static cl::opt<ShaderDispatchMode>
137-
DispatchMode("dispatc-mode",
137+
DispatchMode("dispatch-mode",
138138
cl::desc("Shader dispatch mode"),
139139
cl::values(clEnumValN(ShaderDispatchMode::NOT_APPLICABLE, "na", "dispatch mode not applicable"),
140140
clEnumValN(ShaderDispatchMode::SINGLE_PATCH, "single", "single-dispatch mode"),
@@ -4980,29 +4980,6 @@ static int GetOffsetIncrement(const DataLayout* m_DL, SIMDMode simdMode, Value*
49804980
}
49814981

49824982

4983-
// Generate a predicate based on current active channels. The 'alias' is
4984-
// some existing variable in context to be reused only for generating mask,
4985-
// to avoid allocating a new variable.
4986-
4987-
void EmitPass::emitPredicateFromChannelIP(CVariable* dst, CVariable* alias)
4988-
{
4989-
CVariable* any;
4990-
4991-
if (alias)
4992-
{
4993-
any = m_currShader->GetNewAlias(alias, ISA_TYPE_UD, 0, 1);
4994-
}
4995-
else
4996-
{
4997-
any = m_currShader->GetNewVariable(1, ISA_TYPE_UD, EALIGN_DWORD, CName::NONE);
4998-
}
4999-
5000-
m_encoder->SetSrcRegion(0, 0, 1, 0);
5001-
m_encoder->SetSrcRegion(1, 0, 1, 0);
5002-
m_encoder->Cmp(EPREDICATE_EQ, dst, any, any);
5003-
m_encoder->Push();
5004-
}
5005-
50064983

50074984
void EmitPass::emitSimdLaneId(llvm::Instruction* inst)
50084985
{
@@ -16467,63 +16444,6 @@ unsigned int EmitPass::GetScalarTypeSizeInRegister(const Type* Ty) const
1646716444
return m_currShader->GetScalarTypeSizeInRegister(Ty);
1646816445
}
1646916446

16470-
static uint32_t getUGMLoadBlockVecSize(uint32_t totalBytes, uint32_t& eltBytes)
16471-
{
16472-
uint32_t QWVecSize = totalBytes / sizeof(QWORD);
16473-
16474-
if (totalBytes % sizeof(QWORD) == 0)
16475-
{
16476-
if (QWVecSize == 2 ||
16477-
QWVecSize == 3 ||
16478-
QWVecSize == 4 ||
16479-
QWVecSize == 8 ||
16480-
QWVecSize == 16 ||
16481-
QWVecSize == 32 ||
16482-
QWVecSize == 64)
16483-
{
16484-
eltBytes = sizeof(QWORD);
16485-
return QWVecSize;
16486-
}
16487-
}
16488-
16489-
uint32_t DWVecSize = totalBytes / sizeof(DWORD);
16490-
if (totalBytes % sizeof(DWORD) == 0)
16491-
{
16492-
if (DWVecSize == 2 ||
16493-
DWVecSize == 3 ||
16494-
DWVecSize == 4 ||
16495-
DWVecSize == 8 ||
16496-
DWVecSize == 16 ||
16497-
DWVecSize == 32 ||
16498-
DWVecSize == 64)
16499-
{
16500-
eltBytes = sizeof(DWORD);
16501-
return DWVecSize;
16502-
}
16503-
}
16504-
16505-
eltBytes = 0;
16506-
return 0;
16507-
}
16508-
16509-
static uint32_t getNonTransposePayloadSize(SIMDMode SM, uint32_t elemByteSize, uint32_t numElems)
16510-
{
16511-
if (SM == SIMDMode::SIMD32)
16512-
{
16513-
if (elemByteSize * 32 < 64)
16514-
{
16515-
return numElems;
16516-
}
16517-
else
16518-
{
16519-
uint32_t totalBytes = elemByteSize * numElems * 32;
16520-
return totalBytes / 64;
16521-
}
16522-
}
16523-
return 0;
16524-
}
16525-
16526-
1652716447
void EmitPass::A64LSLoopHead(
1652816448
CVariable* addr, CVariable*& curMask, CVariable*& lsPred, uint& label)
1652916449
{
@@ -18658,15 +18578,6 @@ void EmitPass::emitVectorCopyToAOS(uint32_t AOSBytes,
1865818578
}
1865918579
}
1866018580

18661-
// Handle Copy intrinsic
18662-
void EmitPass::emitGenISACopy(GenIntrinsicInst* GenCopyInst)
18663-
{
18664-
CVariable* Dst = m_destination;
18665-
CVariable* Src = GetSymbol(GenCopyInst->getArgOperand(0));
18666-
Type* Ty = GenCopyInst->getType();
18667-
emitCopyAll(Dst, Src, Ty);
18668-
}
18669-
1867018581
// Push a new frame onto the stack by:
1867118582
// Update FP to the current SP
1867218583
// Increment SP by pushSize

IGC/Compiler/CISACodeGen/EmitVISAPass.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ class EmitPass : public llvm::FunctionPass
194194
void emitLifetimeStart(CVariable* Var, llvm::BasicBlock* BB, llvm::Instruction* I, bool ForAllInstance);
195195
bool waveShuffleCase(CVariable* Var, BasicBlock* BB, Instruction* I, bool ForAllInstance);
196196

197-
// set the predicate with current active channels
198-
void emitPredicateFromChannelIP(CVariable* dst, CVariable* alias = NULL);
199-
200197
// Helper methods for message emit functions.
201198
template <typename T>
202199
void prepareRenderTargetWritePayload(
@@ -434,7 +431,6 @@ class EmitPass : public llvm::FunctionPass
434431
llvm::Value *storedVal, llvm::BasicBlock* BB,
435432
LSC_CACHE_OPTS cacheOpts,
436433
alignment_t align, bool dontForceDMask);
437-
void emitGenISACopy(llvm::GenIntrinsicInst* GenCopyInst);
438434
void emitUniformVectorCopy(CVariable* Dst, CVariable* Src, uint32_t nElts,
439435
uint32_t DstSubRegOffset = 0, uint32_t SrcSubRegOffset = 0);
440436
void emitVectorCopy(CVariable* Dst, CVariable* Src, uint32_t nElts,

0 commit comments

Comments
 (0)