[all-commits] [llvm/llvm-project] 2aa2fd: [NFC][BasicBlockUtils] Refactor GetIfCondition() t...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Jul 23 14:19:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aa2fdeed9dc8af922e424545eae56d81c10599f
      https://github.com/llvm/llvm-project/commit/2aa2fdeed9dc8af922e424545eae56d81c10599f
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-24 (Sat, 24 Jul 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    M llvm/lib/Transforms/Utils/FlattenCFG.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp

  Log Message:
  -----------
  [NFC][BasicBlockUtils] Refactor GetIfCondition() to return the branch, not it's condition

Otherwise e.g. the FoldTwoEntryPHINode() has to do a lot of legwork
to re-deduce what is the dominant block (i.e. for which block
is this branch the terminator).


  Commit: 418dba06064ffe9c5e6433e0045bd88966b5ed12
      https://github.com/llvm/llvm-project/commit/418dba06064ffe9c5e6433e0045bd88966b5ed12
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-24 (Sat, 24 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp

  Log Message:
  -----------
  [NFC][SimplifyCFG] FoldTwoEntryPHINode(): make better use of GetIfCondition() returning dom block


  Commit: 943f85123b72720c1c960c6dee7d20ff1c37ea52
      https://github.com/llvm/llvm-project/commit/943f85123b72720c1c960c6dee7d20ff1c37ea52
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-24 (Sat, 24 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp

  Log Message:
  -----------
  [NFC][SimplifyCFG] Make 'conditional block' handling more straight-forward

This will simplify making use of profile weights
to not perform the speculation when obviously unprofitable.


Compare: https://github.com/llvm/llvm-project/compare/c45e17f11f50...943f85123b72


More information about the All-commits mailing list