Optimizer::optimizeStoresInSingleBasicBlock() was taking an extremely long time due to looping through all the instructions of a single basic block at every iteration. By creating a much smaller list of only load/store operations the first time a single basic block is encountered and reusing that list when the same block is encountered again, this function now runs ~10X faster. In my test case: out/Default/cc_unittests --gtest_filter=ImageBackgroundFilter.BackgroundFilterRotated_GL The sw::optimize function went from taking almost 16s to roughly 1.5s. Bug b/67872293 Change-Id: I7e2e2aa8dc1bf2663988fb59b58d72d9ee986e36 Reviewed-on: https://swiftshader-review.googlesource.com/19408Tested-by:Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| SubmoduleCheck/gtest | Loading commit data... | |
| Android.mk | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| LLVMReactor.cpp | Loading commit data... | |
| LLVMRoutine.cpp | Loading commit data... | |
| LLVMRoutine.hpp | Loading commit data... | |
| LLVMRoutineManager.cpp | Loading commit data... | |
| LLVMRoutineManager.hpp | Loading commit data... | |
| Main.cpp | Loading commit data... | |
| Nucleus.hpp | Loading commit data... | |
| Optimizer.cpp | Loading commit data... | |
| Optimizer.hpp | Loading commit data... | |
| Reactor.hpp | Loading commit data... | |
| Reactor.vcxproj | Loading commit data... | |
| Reactor.vcxproj.filters | Loading commit data... | |
| Routine.cpp | Loading commit data... | |
| Routine.hpp | Loading commit data... | |
| Subzero.sln | Loading commit data... | |
| Subzero.vcxproj | Loading commit data... | |
| Subzero.vcxproj.filters | Loading commit data... | |
| SubzeroLLVMDependencies.vcxproj | Loading commit data... | |
| SubzeroLLVMDependencies.vcxproj.filters | Loading commit data... | |
| SubzeroReactor.cpp | Loading commit data... | |
| SubzeroTest.vcxproj | Loading commit data... | |
| SubzeroTest.vcxproj.filters | Loading commit data... | |
| x86.hpp | Loading commit data... |