Skip to content

Commit df03257

Browse files
authored
Fix missing optimization in CodeSinkingPass (KhronosGroup#6703)
Set `checked_for_uniform_sync_` after the first scan for uniform memory sync instructions in `HasUniformMemorySync`. Since this function is called for most instructions, this change makes the optimization pass O(N) instead of O(N^2). This drastically reduces how long it takes in complex binaries and fulfills what I assume was the original intent of `checked_for_uniform_sync_`.
1 parent 9654570 commit df03257

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

source/opt/code_sink.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ bool CodeSinkingPass::HasUniformMemorySync() {
246246
}
247247
});
248248
has_uniform_sync_ = has_sync;
249+
checked_for_uniform_sync_ = true;
249250
return has_sync;
250251
}
251252

0 commit comments

Comments
 (0)