[all-commits] [llvm/llvm-project] 6c5b62: [BOLT][NFC] Separate isReversibleBranch's 2 semant...

Nathan Sidwell via All-commits all-commits at lists.llvm.org
Fri Jun 28 04:45:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c5b62b846ec327dd8e78d4c365b3059a298c019
      https://github.com/llvm/llvm-project/commit/6c5b62b846ec327dd8e78d4c365b3059a298c019
  Author: Nathan Sidwell <nathan at acm.org>
  Date:   2024-06-28 (Fri, 28 Jun 2024)

  Changed paths:
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/lib/Core/BinaryFunction.cpp
    M bolt/lib/Passes/Instrumentation.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp

  Log Message:
  -----------
  [BOLT][NFC] Separate isReversibleBranch's 2 semantics (#95572)

`isUnsupportedBranch` was renamed (and inverted)  to `isReversibleBranch`, as that was how it was being used. But one use  in `BinaryFunction::disassemble` was using the original meaning to detect unsupported branches, and the `isUnsupportedBranch` had 2 separate semantic checks.

Move the unsupported branch check from `isReversibleBranch` to a new entry point: `isUnsupportedInstruction`. Call that from `BinaryFunction::disassemble`.

Move the dynamic branch check from X86's isReversibleBranch to the base class, as it is not an architecture-specific check.

Remove unnecessary `isReversibleBranch` calls from Instrumentation and X86 MCPlusBuilder.



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