All public non-final methods in Java are virtual, so it is not _that_ trivial. You would have to check all subclasses that might get passed as an argument and check that again whenever new classes are loaded into the JVM.
When a new class is loaded, the analysis checks which codes are no longer valid and mark them for deoptimization.