Skip to content

Commit 58f91e2

Browse files
Kotynia, Piotrigcbot
authored andcommitted
Finish deprecating implicitGID
ImplicitGID pass has been deprecated. Remove related code.
1 parent 8b6dfce commit 58f91e2

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

IGC/Compiler/CISACodeGen/CodeSinking.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -736,11 +736,8 @@ namespace IGC {
736736
// which is not really a local-code-motion
737737
if (def->getNextNode() != use && !isa<PHINode>(use))
738738
{
739-
if (!def->getMetadata("implicitGlobalID"))
740-
{
741-
def->moveBefore(use);
742-
madeChange = true;
743-
}
739+
def->moveBefore(use);
740+
madeChange = true;
744741
}
745742
localInstSet.erase(def);
746743
}

IGC/Compiler/InitializePasses.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ void initializeInsertGenericPtrArithmeticMetadataPass(llvm::PassRegistry&);
9292
void initializeImageFuncResolutionPass(llvm::PassRegistry&);
9393
void initializeImageFuncsAnalysisPass(llvm::PassRegistry&);
9494
void initializeImage3dToImage2darrayPass(llvm::PassRegistry&);
95-
void initializeImplicitGlobalIdPass(llvm::PassRegistry&);
96-
void initializeCleanImplicitIdsPass(llvm::PassRegistry&);
9795
void initializeInlineLocalsResolutionPass(llvm::PassRegistry&);
9896
void initializeInlineUnmaskedFunctionsPassPass(llvm::PassRegistry&);
9997
void initializeInsertBranchOptPass(llvm::PassRegistry&);
@@ -239,7 +237,6 @@ void initializeDebugInfoPassPass(llvm::PassRegistry&);
239237
void initializeIGCLivenessAnalysisPass(llvm::PassRegistry&);
240238
void initializePromoteConstantStructsPass(llvm::PassRegistry&);
241239
void initializeLowerInvokeSIMDPass(llvm::PassRegistry&);
242-
void initializeImplicitGIDRestoringPass(llvm::PassRegistry&);
243240
void initializeRemoveCodeAssumptionsPass(llvm::PassRegistry&);
244241
void initializePromoteBoolsPass(llvm::PassRegistry&);
245242
void initializeResolveConstExprCallsPass(llvm::PassRegistry&);

IGC/Compiler/Optimizer/Scalarizer.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,6 @@ bool ScalarizeFunction::runOnFunction(Function& F)
160160
if (Value * val = dyn_cast<Value>(*index))
161161
{
162162
UndefValue* undefVal = UndefValue::get((*index)->getType());
163-
164-
if (MDNode* pEIMD = (*index)->getMetadata("implicitGlobalID"))
165-
{
166-
// Compute thread and group identification instructions must have 'Output' attribute
167-
// added later during compilation. The implicitGlobalID metadata attached to this
168-
// instruction must be assigned to a new instruction, which replaces this instruction.
169-
// Unfortunatelly, replaceAllUsesWith() will not ensure such propagation.
170-
Instruction* pNewInst = dyn_cast_or_null<llvm::Instruction>(undefVal);
171-
if (pNewInst)
172-
{
173-
IGC_ASSERT_MESSAGE(pNewInst, "Missing implicit global ID instruction");
174-
Instruction* instr = dyn_cast<Instruction>(*index);
175-
pNewInst->copyMetadata(*instr);
176-
}
177-
}
178163
(val)->replaceAllUsesWith(undefVal);
179164
}
180165
IGC_ASSERT_MESSAGE((*index)->use_empty(), "Unable to remove used instruction");

0 commit comments

Comments
 (0)