Skip to content

Commit 2aa1de2

Browse files
admitricigcbot
authored andcommitted
Respect disabing optimization on function in CodeSinking and
remat passes Respect disabing optimization on function in CodeSinking and remat passes
1 parent 71a219b commit 2aa1de2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

IGC/Compiler/CISACodeGen/CodeSinking.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ namespace IGC {
246246

247247
bool CodeSinking::runOnFunction(Function& F)
248248
{
249+
if (skipFunction(F))
250+
return false;
251+
249252
CTX = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
250253
// only limited code-sinking to several shader-type
251254
// vs input has the URB-reuse issue to be resolved.

IGC/Compiler/CISACodeGen/RematAddressArithmetic.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ bool CloneAddressArithmetic::greedyRemat(Function &F) {
254254

255255
bool CloneAddressArithmetic::runOnFunction(Function& F)
256256
{
257+
if (skipFunction(F))
258+
return false;
259+
257260
bool Modified = false;
258261
Modified |= greedyRemat(F);
259262
return Modified;
@@ -278,6 +281,9 @@ IGC_INITIALIZE_PASS_END(RematAddressArithmetic, PASS_FLAG, PASS_DESC, PASS_CFG_O
278281

279282
bool RematAddressArithmetic::runOnFunction(Function& F)
280283
{
284+
if (skipFunction(F))
285+
return false;
286+
281287
bool modified = false;
282288
modified |= rematerializePhiMemoryAddressCalculation(F);
283289
modified |= rematerializePrivateMemoryAddressCalculation(F);

0 commit comments

Comments
 (0)