[PATCH] D54223: WIP... [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 13:54:38 PST 2018


chandlerc added a comment.

I like you suggestion of writing FileCheck against `print<loops>` output.

The 96 loop case .... is painful. Is it possible to get something smaller? Or possible to add something like CHECK-COUNT-<N>: ... ?

Not trying to make this too much yak shaving / work invention so if adding CHECK-COUNT is ... too painful and you can get the large ones closer to 32, I can tolerate that. Still seems better than grep.



================
Comment at: test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch.ll:20-27
+; With relaxed candidates multiplier (cap == 8) and with relaxed siblings
+; multiplier for top-level loops (toplevel-div == 8) we should get
+;    2^(num conds) == 2^5 == 32
+; copies of the loop:
+;
+; RUN: opt < %s -enable-nontrivial-unswitch -enable-unswitch-cost-multiplier=true \
+; RUN:     -unswitch-candidates-bottom-cap=8 -unswitch-siblings-toplevel-div=8 \
----------------
Maybe use cap=4 or something here so that you still see the cap applying compared to the entire thing disabled below?


Repository:
  rL LLVM

https://reviews.llvm.org/D54223





More information about the llvm-commits mailing list