[PATCH] D47683: [PM/LoopUnswitch] Teach the new unswitch to handle nontrivial unswitching of switches.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 23:16:34 PDT 2018


chandlerc added a comment.

In https://reviews.llvm.org/D47683#1126575, @fedor.sergeev wrote:

> Not sure where to put this into... but I ran an experiment by adding -passes=loop(unswitch) to the LoopUnswitch tests and here is the result
>  with the build of all the three dependent fixes:
>  Failing Tests (11):
>
>     LLVM :: Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll
>     LLVM :: Transforms/LoopUnswitch/basictest.ll
>     LLVM :: Transforms/LoopUnswitch/copy-metadata.ll
>     LLVM :: Transforms/LoopUnswitch/elseif-non-exponential-behavior.ll
>     LLVM :: Transforms/LoopUnswitch/guards.ll
>     LLVM :: Transforms/LoopUnswitch/infinite-loop.ll
>     LLVM :: Transforms/LoopUnswitch/msan.ll
>     LLVM :: Transforms/LoopUnswitch/simplify-with-nonvalness.ll
>     LLVM :: Transforms/LoopUnswitch/trivial-unswitch.ll
>     LLVM :: Transforms/LoopUnswitch/unswitch-equality-undef.ll
>     LLVM :: Transforms/LoopUnswitch/unswitch-select.ll
>   
>   Expected Passes    : 30
>   Unsupported Tests  : 1
>   Unexpected Failures: 11
>
>  ------------
>
> Some tests involve selects and guards, which I gather are not yet supported, some involve multiple unswitches over the same loop etc.
>  IMO it makes sense to go through these results and see if there are any surprises there.
>  I can submit a diff (and/or log of the run) if needed.


Most of these test files were ported to the new pass. Some of them aren't relevant any more.

I did in fact go through these and ported as many as I could when doing the initial work. But the old passes's testing is .... not great. I don't think there is much more value in re-analyzing these, but if you see specific things that you'd like to port over, go for it.

On the flip side, if you see specific logic you'd like better testing of, I'm more than happy to just directly add the testing. I think the tests we will get from that will be substantially higher quality.

ONe thing that makes it very expensive is that the results of unswitching are substantially different between the passes meaning that most of the CHECK lines have to be manually rewritten anyways.


Repository:
  rL LLVM

https://reviews.llvm.org/D47683





More information about the llvm-commits mailing list