[all-commits] [llvm/llvm-project] 82cee2: [JumpThreading] Preserve profile metadata during s...

Max Kazantsev via All-commits all-commits at lists.llvm.org
Mon Jan 16 04:04:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82cee24e3d15798c6f7f5b9879723d7f758d8fa0
      https://github.com/llvm/llvm-project/commit/82cee24e3d15798c6f7f5b9879723d7f758d8fa0
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    M llvm/test/Transforms/JumpThreading/select.ll

  Log Message:
  -----------
  [JumpThreading] Preserve profile metadata during select unfolding, take 2

Jump threading can replace select and unconditional branch with
conditional branch, but when doing so loses profile information.

This destructive transform can eventually lead to a performance
degradation due to folding of branches in
shouldFoldCondBranchesToCommonDestination as branch probabilities
are no longer known.

The first version was reverted due to assert caused by i32 overflow,
fixed in this version.

Patch by Roman Paukner!

Differential Revision: https://reviews.llvm.org/D138132
Reviewed By: mkazantsev




More information about the All-commits mailing list