Skip to content

Commit 878b804

Browse files
FilipFudalasys_zuul
authored andcommitted
Add global dead code elimnation pass before ErrorCheck pass
to get rid of dead functions which may contain fp64 types Change-Id: I6019874b6808ad3a0e495649c85f951c28c31673
1 parent 9f5c9ae commit 878b804

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

IGC/AdaptorOCL/UnifyIROCL.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ static void CommonOCLBasedPasses(
279279
mpm.add(new MetaDataUtilsWrapper(pMdUtils, pContext->getModuleMetaData()));
280280
mpm.add(new CodeGenContextWrapper(pContext));
281281

282+
// Run GlobalDCE before ErrorCheck to remove dead functions which may contain fp64 types
283+
mpm.add(createProcessFuncAttributesPass());
284+
mpm.add(createGlobalDCEPass());
285+
282286
mpm.add(new ErrorCheck());
283287

284288
mpm.add(new ClampLoopUnroll(256));

0 commit comments

Comments
 (0)