Fix method and basic block flags used by early opts. (#2126)
Fix method and basic block flags used by early opts.
Add missing BBF_HAS_NULLCHECK in loop test transformation.
This change had no diffs in frameworks and benchmark.
Add missing OMF_HAS_ARRAYREF and BBF_HAS_IDX_LEN in many places.
This change had diffs in frameworks and benchmark since the optimization
replacing GT_ARRLENGTH with a constant fires much more often.
Fix inlining to not lose basic block flags when the inlinee basic block
has a ret expr but no statements.
Change propGetType condition in optDoEarlyPropForFunc to check for OMF_HAS_NEWARRAY
in addition to OMF_HAS_NEWOBJ.
Check that methods and basic blocks that have calls to object allocation
helpers have OMF_HAS_NEWOBJ and BBF_HAS_NEWOBJ set.
Check that methods and basic blocks that have calls to array allocation
helpers have OMF_HAS_NEWARRAY and BBF_HAS_NEWARRAY set.
Check that methods and basic blocks that have GT_NULLCHECK nodes
helpers have OMF_HAS_NULLCHECK and BBF_HAS_NULLCHECK set.
Check that methods and basic blocks that access MethodTable
via GT_IND on a ref have OMF_HAS_VTABLEREF and BBF_HAS_VTABLEREF set.
Check that methods and basic blocks that have GT_ARRLENGTH
have OMF_HAS_ARRAYREF and BBF_HAS_IDX_LEN set.
Fix fgOptWhileLoop that could lose BBF_HAS_NEWOBJ and BBF_HAS_NEWARRAY.
Add asserts to make sure we don't have diverging codegen
in debug/checked/release because of early opts.
Add BBF_HAS_VTABREF to BBF_COMPACT_UPD and BBF_SPLIT_GAINED.
12 files changed: