Files
clang-p2996/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
Mingming Liu e1aa1e43de [WPD]Provide branch weight for checking mode. (#124084)
Checking mode aims to help diagnose and confirm undefined behavior. In
most cases, source code don't cast pointers between unrelated types for
virtual calls, so we expect direct calls in the frequent branch and
debug trap in the unlikely branch.

This way, the overhead of checking mode is not higher than an indirect
call promotion for a hot callsite as long as the callsite doesn't run the debug trap
branch.
2025-01-23 07:52:30 -08:00

101 KiB