PredicateInfo uses OrderedBasicBlock and NewGVN which uses PredicateInfo should keep
it updated and correct.
Details
Diff Detail
- Build Status
Buildable 7792 Build 7792: arc lint + arc unit
Event Timeline
Without a reason to do this specifically, it seems a waste of time
None of this data is used after initial building, and all of these are destroyed after newgvn ends, so updating them doesn't seem to accomplish anything?
I was making the Instruction * in OrdereBasicBlock AssertingVH to make sure things are updated properly when instructions are deleted. If they are not, we are essentially holding a dangling pointer which could in worst case result in invalid dominance relationship being returned. Then i found NewGVN is breaking the rule, i.e. erasing an instruction without updating OrderedBasicBlock in OrderedInstruction.
I agree the way NewGVN is written now is ok even without updating the OrderedBasicBlock. Maybe we should not make Instruction * in OBB AssertingVH. Instead should give user the freedom to invalidate if necessary.