JIT: chained guarded devirtualization (#51890)
When expanding a guarded devirtualization call site, scout ahead to see if there's another site just after this one. If so, expand the second site so that the frequently-taken paths from the first and second tests form a join-free "hot path". Continue scouting and chaining candidates along this path until we run out of candidates, find a big enough stretch without a candidate, or find a candidate with low likelihood of success. Chaining enhances the abilities of the redundant branch optimizer to clean up redundant type tests, so if there are multiple virtual or interface calls in a short span, all dispatching off the same object, one test will suffice to cover all the calls.
Showing
想要评论请 注册 或 登录