[all-commits] [llvm/llvm-project] 618892: [TTI][NFC] Introduce option to set predictable bra...

serguei-katkov via All-commits all-commits at lists.llvm.org
Thu Feb 2 02:55:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6188929dfbda9adebdd9a1393febd6dd08842ab3
      https://github.com/llvm/llvm-project/commit/6188929dfbda9adebdd9a1393febd6dd08842ab3
  Author: Serguei Katkov <serguei.katkov at azul.com>
  Date:   2023-02-02 (Thu, 02 Feb 2023)

  Changed paths:
    M llvm/lib/Analysis/TargetTransformInfo.cpp

  Log Message:
  -----------
  [TTI][NFC] Introduce option to set predictable branch threshold

Currently TargetTransformInfo::getPredictableBranchThreshold() method
returns hardcoded value 99. This value affects the decision whether to
convert select instruction to branch or not in several passes:
SelectOptimize, CodeGenPrepare, SimplifyCFG.

It would be useful to make possible to play with that threshold in order
to test select-optimize heuristics.

Option was originally introduced in the TargetLoweringBase, but was
removed in the revision 664d0c052c315 and not restored in the TTI

Patch Author: aleksandr.popov
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D143060




More information about the All-commits mailing list