[all-commits] [llvm/llvm-project] 5bae81: [CodeGen] Add an option to skip extTSP BB placemen...

Krzysztof Pszeniczny via All-commits all-commits at lists.llvm.org
Wed Jul 24 08:43:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5bae81ba9e6db16fac3cc0ee96b134f3f588c8f4
      https://github.com/llvm/llvm-project/commit/5bae81ba9e6db16fac3cc0ee96b134f3f588c8f4
  Author: Krzysztof Pszeniczny <kpszeniczny at google.com>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachineBlockPlacement.cpp
    M llvm/test/CodeGen/X86/code_placement_ext_tsp_large.ll

  Log Message:
  -----------
  [CodeGen] Add an option to skip extTSP BB placement for huge functions. (#99310)

The extTSP-based basic block layout algorithm improves the performance
of the generated code, but unfortunately it has a super-linear time
complexity. This leads to extremely long compilation times for certain
relatively rare kinds of autogenerated code.

This patch adds an `-mllvm` flag to optionally restrict extTSP only to
functions smaller than a specified threshold. While commit
bcdc0477319a26fd8dcdde5ace3bdd6743599f44 added a knob to to limit the
maximum chain size, it's still possible that for certain huge functions
the number of chains is very large, leading to a quadratic behaviour in
ExtTSPImpl::mergeChainPairs.



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