Skip to content

Commit 74241f3

Browse files
author
kevyuu
committed
Add comment on why we need multiple dead branch elimination and multiple dead function pass
1 parent 9eab2f8 commit 74241f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/nbl/asset/utils/ISPIRVEntryPointTrimmer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ static constexpr spv_target_env SPIRV_VERSION = spv_target_env::SPV_ENV_UNIVERSA
1212

1313
ISPIRVEntryPointTrimmer::ISPIRVEntryPointTrimmer()
1414
{
15+
// Multiple dead branch and dead function elimination because the first entry point removal might result to dead branch. Then the dead branch might result to dead function. Then, the dead function might result to dead branch and so on.
1516
constexpr auto optimizationPasses = std::array{
1617
ISPIRVOptimizer::EOP_DEAD_BRANCH_ELIM,
1718
ISPIRVOptimizer::EOP_ELIM_DEAD_FUNCTIONS,

0 commit comments

Comments
 (0)