[all-commits] [llvm/llvm-project] 6d44b3: [NFCI][DomTreeUpdater] applyUpdates(): reserve spa...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sun Apr 11 13:56:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d44b3c56d4a80b16f144a52bc841111c0b4d2c2
      https://github.com/llvm/llvm-project/commit/6d44b3c56d4a80b16f144a52bc841111c0b4d2c2
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

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

  Log Message:
  -----------
  [NFCI][DomTreeUpdater] applyUpdates(): reserve space for updates first

While, indeed, we may end up pushing less updates that we'd reserve space
for, self-dominating updates aren't often enough for that to matter.
But this should matter for normal updates.


  Commit: 2def9c3d8ed9df5a5dc737343c891ac17de1afc1
      https://github.com/llvm/llvm-project/commit/2def9c3d8ed9df5a5dc737343c891ac17de1afc1
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

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

  Log Message:
  -----------
  [NFCI][Local] TryToSimplifyUncondBranchFromEmptyBlock(): improve Dominator Tree updating

First, we don't need vector-ness for the predecessor lists.

Secondly, like elsewhere, do insertions before deletions.

Lastly, the check that we actually need to insert an edge,
that it doesn't exist already, is backwards. Instead of
looking at successors of every single 'PredOfBB',
just always look at predecessors of the 'Succ'.
The result is always the same, but we avoid *really* inefficient code.


  Commit: e5692a564a73ef63b7baaf80c2b7a62ad74e9e66
      https://github.com/llvm/llvm-project/commit/e5692a564a73ef63b7baaf80c2b7a62ad74e9e66
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

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

  Log Message:
  -----------
  [NFCI][BasicBlockUtils] MergeBlockIntoPredecessor(): improve Dominator Tree updating

Same as with TryToSimplifyUncondBranchFromEmptyBlock() patch.


  Commit: 0699da1569870a4f7cf26534b87ca3c3b14caf3b
      https://github.com/llvm/llvm-project/commit/0699da1569870a4f7cf26534b87ca3c3b14caf3b
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

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

  Log Message:
  -----------
  [NFCI][Local] MergeBasicBlockIntoOnlyPred(): improve Dominator Tree updating

Same as with TryToSimplifyUncondBranchFromEmptyBlock()/MergeBlockIntoPredecessor() patch.


  Commit: 13fca9d8161e3a203dce6d7647763a07d39bed3f
      https://github.com/llvm/llvm-project/commit/13fca9d8161e3a203dce6d7647763a07d39bed3f
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp

  Log Message:
  -----------
  [NFCI][SimplifyCFG] mergeEmptyReturnBlocks(): improve Dominator Tree updating

Same as with previous patches.


  Commit: 8fc8c745cffb1a7ae3a8ed5d0a4962b193d7cd78
      https://github.com/llvm/llvm-project/commit/8fc8c745cffb1a7ae3a8ed5d0a4962b193d7cd78
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-11 (Sun, 11 Apr 2021)

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

  Log Message:
  -----------
  [NFCI][SimplifyCFG] PerformValueComparisonIntoPredecessorFolding(): improve Dominator Tree updating

Same as with previous patches.


Compare: https://github.com/llvm/llvm-project/compare/816cf4146280...8fc8c745cffb


More information about the All-commits mailing list