• svenpanne@chromium.org's avatar
    Added a simple dead code removal phase. · f03fd70d
    svenpanne@chromium.org authored
    We iteratively remove all dead Hydrogen instruction until we reach a fixed point. We consider an instruction dead if it is unused, has no observable side effects and is deletable. The last part of the condition is currently not very nice: We basically have to whitelist "safe" instructions, because we are missing more detailed dependencies and/or more detailed tracking of side effects.
    
    We disable dead code elimination for now in our test runners, because we have tons of poorly written tests which wouldn't test anymore what they are supposed to test with this phase enabled. To get test coverage for dead code elimination itself, we should enable it on a few build bots. This is not really a perfect state, but the best we can do for now.
    
    This patch includes a few const-correctness fixes, most of them were necessary for this CL.
    
    Review URL: https://codereview.chromium.org/11088027
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    f03fd70d
utils.h 29.8 KB