-
Remove legacy optimization passes. · 6ddeb6baNicolas Capens authored
optimizeSingleBasicBlockLoadsStores() supersedes both eliminateLoadsFollowingSingleStore() and optimizeStoresInSingleBasicBlock(). This was verified by adding asserts the latter when the delete more instructions. They're never hit by dEQP-VK tests. Only the PointerToPointer triggers an assert. It goes away when running optimizeSingleBasicBlockLoadsStores() twice. Since it is very rare to store the address of a pointer in another pointer, and before the new optimization pass was implemented we also did not handle this case, we're not going to pay the cost of running it twice. eliminateUnitializedLoads() was moved earlier because we never produce new loads of uninitialized values in the optimization passes and it's best to eliminate these allocas early. The late eliminateDeadCode() was also removed since we already run it at the end of optimizeSingleBasicBlockLoadsStores(). TODOs for cases where the load/store sizes don't match have been removed because propagating a different type causes issues. Bug: b/179668593 Change-Id: I4b3533057423709cdaa8343301184d8225b0727b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53128 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
6ddeb6ba
×