[all-commits] [llvm/llvm-project] e1aa1e: [WPD]Provide branch weight for checking mode. (#12...

Mingming Liu via All-commits all-commits at lists.llvm.org
Thu Jan 23 07:52:52 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1aa1e43decf9275175845bea970ef6d7c2b1af6
      https://github.com/llvm/llvm-project/commit/e1aa1e43decf9275175845bea970ef6d7c2b1af6
  Author: Mingming Liu <mingmingl at google.com>
  Date:   2025-01-23 (Thu, 23 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
    M llvm/test/ThinLTO/X86/devirt_check.ll

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list