[VM] Ensure we handle devirtualized calls inside ApplyClassIds() as well

After recent changes to pragmas, TFA devirtualizes more calls, which has
regressed a Prime

This gets rid of the 5% regression in PrimeNumber/PrimeNumberTyped in
dart-aot (which 0ef66e0f5 introduced). Furthermore it improves MD5/SHA
by double digits percent.

Change-Id: Ia4d1fb62512495dec7111efc53c4d7a4de5ef3af
Reviewed-on: https://dart-review.googlesource.com/c/85398
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 948259e..1dd24e3 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -187,6 +187,10 @@
             VisitInstanceCall(call);
           }
         }
+      } else if (auto static_call = instr->AsStaticCall()) {
+        // If TFA devirtualized instance calls to static calls we also want to
+        // process them here.
+        VisitStaticCall(static_call);
       } else if (instr->IsPolymorphicInstanceCall()) {
         SpecializePolymorphicInstanceCall(instr->AsPolymorphicInstanceCall());
       }