[all-commits] [llvm/llvm-project] 087be5: [NFC][SimplifyCFG] Add a test with cond br on cons...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Thu Jan 7 15:19:52 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 087be536feab0aacc043aed52bee2e48e90e538c
      https://github.com/llvm/llvm-project/commit/087be536feab0aacc043aed52bee2e48e90e538c
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    M llvm/test/Transforms/SimplifyCFG/branch-fold.ll

  Log Message:
  -----------
  [NFC][SimplifyCFG] Add a test with cond br on constant w/ identical destinations


  Commit: 16ab8e5f6dbbeb5b8e900677f4a64c9924ecd7ba
      https://github.com/llvm/llvm-project/commit/16ab8e5f6dbbeb5b8e900677f4a64c9924ecd7ba
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] ConstantFoldTerminator(): handle matching destinations of condbr earlier

We need to handle this case before dealing with the case of constant
branch condition, because if the destinations match, latter fold
would try to remove the DomTree edge that would still be present.

This allows to make that particular DomTree update non-permissive


  Commit: 36593a30a40b52e8040d821bbd294ef6758cf9cf
      https://github.com/llvm/llvm-project/commit/36593a30a40b52e8040d821bbd294ef6758cf9cf
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `SwitchInst` handling

... which requires not deleting edges that will still be present.


  Commit: 8b9a0e6f7ed2fa3293ba5cd2c2fb1acd21db6e2d
      https://github.com/llvm/llvm-project/commit/8b9a0e6f7ed2fa3293ba5cd2c2fb1acd21db6e2d
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    M llvm/test/Transforms/SimplifyCFG/indirectbr.ll

  Log Message:
  -----------
  [NFC][SimlifyCFG] Add some indirectbr-of-blockaddress tests


  Commit: b3822728fae2e3755d6daff7fc31fbac16e61fe4
      https://github.com/llvm/llvm-project/commit/b3822728fae2e3755d6daff7fc31fbac16e61fe4
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] ConstantFoldTerminator(): switch to non-permissive DomTree updates in `indirectbr` handling

... which requires not deleting edges that were just deleted already.


  Commit: 1f9b591ee66fe5abd6f63990b085e1f1f559d8d9
      https://github.com/llvm/llvm-project/commit/1f9b591ee66fe5abd6f63990b085e1f1f559d8d9
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.


  Commit: f8875c313c381764a9734dbd6e94539e8837d9f7
      https://github.com/llvm/llvm-project/commit/f8875c313c381764a9734dbd6e94539e8837d9f7
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    A llvm/test/Transforms/SimplifyCFG/unreachable-matching-successor.ll

  Log Message:
  -----------
  [NFC][SimplifyCFG] Add test with an unreachable block with two identical successors


  Commit: 7600d7c7be07ee78543522d0fbd1e92e672a0327
      https://github.com/llvm/llvm-project/commit/7600d7c7be07ee78543522d0fbd1e92e672a0327
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] removeUnreachableBlocks(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.


  Commit: 6984781df9b584febce51b7740c8738a076f5692
      https://github.com/llvm/llvm-project/commit/6984781df9b584febce51b7740c8738a076f5692
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

  Changed paths:
    A llvm/test/Transforms/SimplifyCFG/change-to-unreachable-matching-successor.ll

  Log Message:
  -----------
  [NFC][SimplifyCFG] Add a test with an undef cond branch to identical destinations


  Commit: 05adc73db053fd79e64901e359e6ee783d772a80
      https://github.com/llvm/llvm-project/commit/05adc73db053fd79e64901e359e6ee783d772a80
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] changeToUnreachable(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same predecessor more than once.


  Commit: 66189212bbb0351ae98bbda70bd2cd819e86fd17
      https://github.com/llvm/llvm-project/commit/66189212bbb0351ae98bbda70bd2cd819e86fd17
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] MergeBlockIntoPredecessor(): switch to non-permissive DomTree updates

... which requires not deleting edges that were just deleted already,
    by not processing the same successor more than once.


  Commit: be0a31d13bcf28577f65b8e189a8bb105b000274
      https://github.com/llvm/llvm-project/commit/be0a31d13bcf28577f65b8e189a8bb105b000274
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] DeleteDeadBlocks(): switch to non-permissive DomTree updates

No actual changes needed, DetatchDeadBlocks() was already doing the right thing.


  Commit: f0eba8ce2d4027a890751b7617e98730d7d682f6
      https://github.com/llvm/llvm-project/commit/f0eba8ce2d4027a890751b7617e98730d7d682f6
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] changeToCall(): switch to non-permissive DomTree updates

No actual changes needed, normal and unwind destinations of an invoke
can never be identical.


  Commit: d59f97bb3a652565ac074e76da2b6b54816880f3
      https://github.com/llvm/llvm-project/commit/d59f97bb3a652565ac074e76da2b6b54816880f3
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] removeUnwindEdge(): switch to non-permissive DomTree updates

No actual changes needed, Catchswitch cannot unwind to one of its catchpads.


  Commit: f2f81c554b0d38edf754a220bcb063876747ee6b
      https://github.com/llvm/llvm-project/commit/f2f81c554b0d38edf754a220bcb063876747ee6b
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-08 (Fri, 08 Jan 2021)

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

  Log Message:
  -----------
  [SimplifyCFG] markAliveBlocks(): switch to non-permissive DomTree updates

No actual changes needed, invoke can't have the same block as an unwind
destination and a normal destination.


Compare: https://github.com/llvm/llvm-project/compare/9ccf13c36d1c...f2f81c554b0d


More information about the All-commits mailing list