mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 19:20:05 +00:00
Add private to local to optimization and size passes.
Many optimization will run on function scope symbols only. When symbols are moved from private scope to function scople, then these optimizations can do more. I believe it is a good idea to run this pass with both -O and -Os. To get the most out of it it should be run ASAP after inlining and something that remove all of the dead functions.
This commit is contained in:
parent
4926f295b1
commit
101a9bcbb0
@ -140,6 +140,7 @@ Optimizer& Optimizer::RegisterPerformancePasses() {
|
||||
return RegisterPass(CreateMergeReturnPass())
|
||||
.RegisterPass(CreateInlineExhaustivePass())
|
||||
.RegisterPass(CreateAggressiveDCEPass())
|
||||
.RegisterPass(CreatePrivateToLocalPass())
|
||||
.RegisterPass(CreateLocalSingleBlockLoadStoreElimPass())
|
||||
.RegisterPass(CreateLocalSingleStoreElimPass())
|
||||
.RegisterPass(CreateAggressiveDCEPass())
|
||||
@ -175,6 +176,7 @@ Optimizer& Optimizer::RegisterSizePasses() {
|
||||
return RegisterPass(CreateMergeReturnPass())
|
||||
.RegisterPass(CreateInlineExhaustivePass())
|
||||
.RegisterPass(CreateAggressiveDCEPass())
|
||||
.RegisterPass(CreatePrivateToLocalPass())
|
||||
.RegisterPass(CreateScalarReplacementPass())
|
||||
.RegisterPass(CreateLocalAccessChainConvertPass())
|
||||
.RegisterPass(CreateLocalSingleBlockLoadStoreElimPass())
|
||||
|
Loading…
Reference in New Issue
Block a user