[all-commits] [llvm/llvm-project] 61ec22: [NFC][SimplifyCFG] Add testcase showing that we fa...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Jan 15 12:37:03 PST 2021


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

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

  Log Message:
  -----------
  [NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect()


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

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

  Log Message:
  -----------
  [Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree

Even though not all it's users operate on DomTreeUpdater,
it itself internally operates on DomTreeUpdater,
so it must mean everything is fine with that,
so just do that globally.


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

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

  Log Message:
  -----------
  [Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.


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

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

  Log Message:
  -----------
  [SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.


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

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

  Log Message:
  -----------
  [SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.


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

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

  Log Message:
  -----------
  [SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed

DestBB might or might not already be a successor of SelectBB,
and it wasn't we need to ensure that we record the fact in DomTree.

The testcase used to crash in lazy domtree updater mode + non-per-function
domtree validity checks disabled.


Compare: https://github.com/llvm/llvm-project/compare/64db296e5a8c...a14c36fe27f5


More information about the All-commits mailing list