Simplifying code for adding instructions to worklist
authorAlan Baker <alanbaker@google.com>
Thu, 18 Jan 2018 19:15:54 +0000 (14:15 -0500)
committerSteven Perron <stevenperron@google.com>
Fri, 19 Jan 2018 01:36:46 +0000 (20:36 -0500)
commit73940aba1b5c011fef84eab1a8f334146978813a
treed18f7e4ce1525227ee0e7ad9b7f5a93b2d4c7a15
parent34d4294c2c610035e6e6bd10ef27e71692cbf85a
Simplifying code for adding instructions to worklist

* AddToWorklist can now be called unconditionally
 * It will only add instructions that have not already been marked as
 live
 * Fixes a case where a merge was not added to the worklist because the
 branch was already marked as live
* Added two similar tests that fail without the fix
source/opt/aggressive_dead_code_elim_pass.cpp
source/opt/aggressive_dead_code_elim_pass.h
test/opt/aggressive_dead_code_elim_test.cpp