Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • Reactor
  • Optimizer.cpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Remove legacy optimization passes. · 6ddeb6ba
    Nicolas Capens authored Feb 22, 2021
    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: 's avatarNicolas Capens <nicolascapens@google.com>
    Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    6ddeb6ba
Optimizer.cpp 20 KB
EditWeb IDE
×

Replace Optimizer.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.