Skip to content

Commit f93efbf

Browse files
skarczewigcbot
authored andcommitted
Add possibility to disable CustomUnsafeOptPass
Add possibility to disable CustomUnsafeOptPass
1 parent 0402b7d commit f93efbf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

IGC/Compiler/CustomUnsafeOptPass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ CustomUnsafeOptPass::CustomUnsafeOptPass()
115115

116116
bool CustomUnsafeOptPass::runOnFunction(Function& F)
117117
{
118-
if (IGC_IS_FLAG_ENABLED(DisableCustomUnsafeOpt))
118+
if (getAnalysis<MetaDataUtilsWrapper>().getModuleMetaData()->compOpt.disableCustomUnsafeOpts ||
119+
IGC_IS_FLAG_ENABLED(DisableCustomUnsafeOpt))
119120
{
120121
return false;
121122
}

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ namespace IGC
377377
unsigned VISAPreSchedRPThreshold = 0;
378378
unsigned SetLoopUnrollThreshold = 0;
379379
bool UnsafeMathOptimizations = false;
380+
bool disableCustomUnsafeOpts = false;
380381
bool FiniteMathOnly = false;
381382
bool FastRelaxedMath = false;
382383
bool DashGSpecified = false;

0 commit comments

Comments
 (0)