This patch adds the forward scan for finding redundant DBG_VALUEs.
This analysis aims to remove redundant DBG_VALUEs by going forward
in the basic block by considering the first DBG_VALUE as a valid
until its first (location) operand is not clobbered/modified.
For example:
(1) DBG_VALUE $edi, !"var1", ... (2) <block of code that does affect $edi> (3) DBG_VALUE $edi, !"var1", ... ...
in this case, we can remove (3).
In order to make this compatible with DBG_VALUE_LIST, it would probably be best to add a check: if MI.isListDebugValue(), then terminate any existing VariableMap entry for Var. This should ensure that we don't incorrectly attempt to handle DBG_VALUE_LISTs by considering only their first debug operand, or ignore them entirely and potentially incorrectly remove identical DBG_VALUEs that have a DBG_VALUE_LIST for the same variable between them.