[all-commits] [llvm/llvm-project] 4bcbbe: [BOLT] Refactor fixBranches() (#73752)

Maksim Panchenko via All-commits all-commits at lists.llvm.org
Wed Nov 29 16:24:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4bcbbe1f70d8c8169c8bda75d9d9d4fdf689b1df
      https://github.com/llvm/llvm-project/commit/4bcbbe1f70d8c8169c8bda75d9d9d4fdf689b1df
  Author: Maksim Panchenko <maks at fb.com>
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
    M bolt/lib/Core/BinaryFunction.cpp

  Log Message:
  -----------
  [BOLT] Refactor fixBranches() (#73752)

Simplify code in fixBranches(). Mostly NFC, accept the x86-specific
check for code fragments now takes into account presence of more than
two fragments. Should only matter when we split code into multiple
fragments and can run fixBranches() more than once.

Also, don't replace a branch target with the same one, as such operation
may allocate memory for extra MCSymbolRefExpr.




More information about the All-commits mailing list