Opt: Check for side-effects in DCEInst()
authorGregF <greg@LunarG.com>
Wed, 21 Feb 2018 23:43:33 +0000 (16:43 -0700)
committerSteven Perron <stevenperron@google.com>
Thu, 22 Feb 2018 17:24:13 +0000 (12:24 -0500)
commit46a9ec9d2312bc8f2a87810614d06c721ea3121c
treed5a0f644500184fba14a901008df80d66ad51e69
parent01760d2f0f6422b330ea99dd67da72230ef2bbd7
Opt: Check for side-effects in DCEInst()

This function now checks for side-effects before adding operand
instructions to the dead instruction work list.

Because this fix puts more pressure on IsCombinatorInstruction() to
be correct, this commit adds all OpConstant* and OpType* instructions
to combinator_ops_ set.

Fixes #1341.
source/opt/ir_context.cpp
source/opt/mem_pass.cpp
test/opt/local_single_store_elim_test.cpp