[all-commits] [llvm/llvm-project] 892305: [BOLT] fix the endless loop of --iterative-guess

chenpeihao3 via All-commits all-commits at lists.llvm.org
Fri Aug 4 02:03:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 892305adb116552caf826557f9786e5773e27e37
      https://github.com/llvm/llvm-project/commit/892305adb116552caf826557f9786e5773e27e37
  Author: chenpeihao3 <chenpeihao3 at huawei.com>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M bolt/lib/Passes/MCF.cpp

  Log Message:
  -----------
  [BOLT] fix the endless loop of --iterative-guess

Solve the endless loop caused by iterative guess. The main function of this option is guessEdgeByIterativeApproach, where the do while loop involves guessPredEdgeCounts and guessSuccessEdgeCounts. In some scenarios, the do while loop will fall into an endless loop. The reason is that although the GuessedPredEdgeCounts function has guessed the pred-edges counts, GuessedArcs does not insert the corresponding BB block, resulting in the changed variable always being true.

Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D154922




More information about the All-commits mailing list