ART: fix NullCheckElimination to preserve MIR_IGNORE_NULL_CHECK

If the MIRGraph::EliminateNullChecksAndInferTypes() function managed
to prove that some regs are non-null then it sets the flag
MIR_IGNORE_NULL_CHECK and resets this flag for all the other regs.
If some previous optimizations have already set MIR_IGNORE_NULL_CHECK
then it can be reset by EliminateNullChecksAndInferTypes. This way
NullCheckElimination discards some optimization efforts.
Optimization passes should not reset MIR_IGNORE_NULL_CHECK unless
they 100% sure NullCheck is needed.

This patch makes the NCE_TypeInference pass be conservative in
resetting MIR_IGNORE_NULL_CHECK.

Change-Id: I4ea74020968b5c5bd8e3af48211ffd4c6afd7f80
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
1 file changed