In the new pass manager, getting access to BPI reliability is a challenge. In practice, we've been running downstream with a variation of this non-BPI based heuristic.
(I also have some patches I'll post shortly to improve invalidation, but I'm not sure I can push that all the way through yet.)
Original patch by: Anna Thomas (with heavy modification by me)