[all-commits] [llvm/llvm-project] a5f3d1: [BOLT][NFC] Return Error from BinaryFunctionPass::...

Amir Ayupov via All-commits all-commits at lists.llvm.org
Mon Feb 12 14:36:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5f3d1a803020167bd9d494a8a3921e7dcc1550a
      https://github.com/llvm/llvm-project/commit/a5f3d1a803020167bd9d494a8a3921e7dcc1550a
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M bolt/include/bolt/Passes/ADRRelaxationPass.h
    M bolt/include/bolt/Passes/Aligner.h
    M bolt/include/bolt/Passes/AllocCombiner.h
    M bolt/include/bolt/Passes/AsmDump.h
    M bolt/include/bolt/Passes/BinaryPasses.h
    M bolt/include/bolt/Passes/CMOVConversion.h
    M bolt/include/bolt/Passes/FixRISCVCallsPass.h
    M bolt/include/bolt/Passes/FixRelaxationPass.h
    M bolt/include/bolt/Passes/FrameOptimizer.h
    M bolt/include/bolt/Passes/Hugify.h
    M bolt/include/bolt/Passes/IdenticalCodeFolding.h
    M bolt/include/bolt/Passes/IndirectCallPromotion.h
    M bolt/include/bolt/Passes/Inliner.h
    M bolt/include/bolt/Passes/Instrumentation.h
    M bolt/include/bolt/Passes/JTFootprintReduction.h
    M bolt/include/bolt/Passes/LongJmp.h
    M bolt/include/bolt/Passes/LoopInversionPass.h
    M bolt/include/bolt/Passes/PLTCall.h
    M bolt/include/bolt/Passes/PatchEntries.h
    M bolt/include/bolt/Passes/RegReAssign.h
    M bolt/include/bolt/Passes/ReorderData.h
    M bolt/include/bolt/Passes/ReorderFunctions.h
    M bolt/include/bolt/Passes/RetpolineInsertion.h
    M bolt/include/bolt/Passes/SplitFunctions.h
    M bolt/include/bolt/Passes/StokeInfo.h
    M bolt/include/bolt/Passes/TailDuplication.h
    M bolt/include/bolt/Passes/ThreeWayBranch.h
    M bolt/include/bolt/Passes/ValidateInternalCalls.h
    M bolt/include/bolt/Passes/ValidateMemRefs.h
    M bolt/include/bolt/Passes/VeneerElimination.h
    M bolt/lib/Passes/ADRRelaxationPass.cpp
    M bolt/lib/Passes/Aligner.cpp
    M bolt/lib/Passes/AllocCombiner.cpp
    M bolt/lib/Passes/AsmDump.cpp
    M bolt/lib/Passes/BinaryPasses.cpp
    M bolt/lib/Passes/CMOVConversion.cpp
    M bolt/lib/Passes/FixRISCVCallsPass.cpp
    M bolt/lib/Passes/FixRelaxationPass.cpp
    M bolt/lib/Passes/FrameOptimizer.cpp
    M bolt/lib/Passes/Hugify.cpp
    M bolt/lib/Passes/IdenticalCodeFolding.cpp
    M bolt/lib/Passes/IndirectCallPromotion.cpp
    M bolt/lib/Passes/Inliner.cpp
    M bolt/lib/Passes/Instrumentation.cpp
    M bolt/lib/Passes/JTFootprintReduction.cpp
    M bolt/lib/Passes/LongJmp.cpp
    M bolt/lib/Passes/LoopInversionPass.cpp
    M bolt/lib/Passes/PLTCall.cpp
    M bolt/lib/Passes/PatchEntries.cpp
    M bolt/lib/Passes/RegReAssign.cpp
    M bolt/lib/Passes/ReorderData.cpp
    M bolt/lib/Passes/ReorderFunctions.cpp
    M bolt/lib/Passes/RetpolineInsertion.cpp
    M bolt/lib/Passes/SplitFunctions.cpp
    M bolt/lib/Passes/StokeInfo.cpp
    M bolt/lib/Passes/TailDuplication.cpp
    M bolt/lib/Passes/ThreeWayBranch.cpp
    M bolt/lib/Passes/ValidateInternalCalls.cpp
    M bolt/lib/Passes/ValidateMemRefs.cpp
    M bolt/lib/Passes/VeneerElimination.cpp
    M bolt/lib/Rewrite/BinaryPassManager.cpp
    M bolt/lib/Rewrite/BoltDiff.cpp

  Log Message:
  -----------
  [BOLT][NFC] Return Error from BinaryFunctionPass::runOnFunctions (#81521)

As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we change the
interface to `BinaryFunctionPass` to return an Error on
`runOnFunctions()`. This gives passes the ability to report a
serious problem to the caller (RewriteInstance class), so the
caller may decide how to best handle the exceptional situation.

Co-authored-by: Rafael Auler <rafaelauler at fb.com>

Test Plan: NFC




More information about the All-commits mailing list