[all-commits] [llvm/llvm-project] 4fc908: [NFC][SimplifyCFG] Add a test where we fail to pre...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sun Jan 3 14:07:21 PST 2021


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

  Changed paths:
    A llvm/test/Transforms/SimplifyCFG/SimplifyTerminatorOnSelect-domtree-preservation-edgecase.ll

  Log Message:
  -----------
  [NFC][SimplifyCFG] Add a test where we fail to preserve DomTree validity


  Commit: 70935b9595a410794882d043726a1aad38d44ebd
      https://github.com/llvm/llvm-project/commit/70935b9595a410794882d043726a1aad38d44ebd
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

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

  Log Message:
  -----------
  [NFC][SimplifyCFG] SimplifyTerminatorOnSelect(): pull out OldTerm->getParent() into a variable


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

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/SimplifyTerminatorOnSelect-domtree-preservation-edgecase.ll

  Log Message:
  -----------
  [SimplifyCFG] SimplifyTerminatorOnSelect(): fix/tune DomTree updates

We only need to remove non-TrueBB/non-FalseBB successors,
and we only need to do that once. We don't need to insert
any new edges, because no new successors will be added.


  Commit: 98cd1c33e3c2c3cfee36fb0fea3285fda06224d3
      https://github.com/llvm/llvm-project/commit/98cd1c33e3c2c3cfee36fb0fea3285fda06224d3
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

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

  Log Message:
  -----------
  [NFC][SimplifyCFG] Hoist 'original' DomTree verification from simplifyOnce() into run()

This is NFC since SimplifyCFG still currently defaults to not preserving DomTree.

SimplifyCFGOpt::simplifyOnce() is only be called from SimplifyCFGOpt::run(),
and can not be called externally, since SimplifyCFGOpt is defined in .cpp
This avoids some needless verifications, and is thus a bit faster
without sacrificing precision.


Compare: https://github.com/llvm/llvm-project/compare/3715c99be9dc...98cd1c33e3c2


More information about the All-commits mailing list