[all-commits] [llvm/llvm-project] 7c5f10: [SimplifyCFG] Drop support for duplicating ret's i...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon Jul 26 13:33:06 PDT 2021


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

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    R llvm/test/Transforms/SimplifyCFG/duplicate-ret-into-uncond-br.ll
    M llvm/test/Transforms/SimplifyCFG/merge-duplicate-conditional-ret-val.ll
    M llvm/test/Transforms/SimplifyCFG/return-merge.ll

  Log Message:
  -----------
  [SimplifyCFG] Drop support for duplicating ret's into uncond predecessors

This functionality existed only under a default-off flag,
and simplifycfg nowadays prefers to not increase the count of ret's.


  Commit: 08efc2e68d5f9fe522fe8d70d0bd5ddf45f78848
      https://github.com/llvm/llvm-project/commit/08efc2e68d5f9fe522fe8d70d0bd5ddf45f78848
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-26 (Mon, 26 Jul 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] Drop support for simplifying cond branch to two (different) ret's

Nowadays, simplifycfg pass already tail-merges all the ret blocks together
before doing anything, and it should not increase the count of ret's,
so this is dead code.


  Commit: 1901c98dd81bded0b95b2a1c0de05d56c24e7408
      https://github.com/llvm/llvm-project/commit/1901c98dd81bded0b95b2a1c0de05d56c24e7408
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-26 (Mon, 26 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/simplifycfg-late.ll
    M llvm/test/Transforms/SimplifyCFG/Hexagon/switch-to-lookup-table.ll
    M llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
    M llvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
    M llvm/test/Transforms/SimplifyCFG/rangereduce.ll

  Log Message:
  -----------
  [SimplifyCFG] SwitchToLookupTable(): don't increase ret count

The very next SimplifyCFG pass invocation will tail-merge these two ret's
anyways, there is not much point in creating more work for ourselves.


Compare: https://github.com/llvm/llvm-project/compare/20555a15a596...1901c98dd81b


More information about the All-commits mailing list