[PATCH] D102234: [SimpleLoopBoundSplit] Split Bound of Loop which has conditional branch with IV

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 02:37:21 PDT 2021


jaykang10 added a comment.

In D102234#2801815 <https://reviews.llvm.org/D102234#2801815>, @mkazantsev wrote:

> My fuzzer didn't reveal any new failures, so there is a chance it's working as expected. :) LGTM with some nits.

Thanks for your kind help! @mkazantsev :)

I have tried to enable this pass in the pipeline of new pass manager after loop unroll experimentally.

  if (Phase != ThinOrFullLTOPhase::ThinLTOPreLink || !PGOOpt ||
      PGOOpt->Action != PGOOptions::SampleUse)
    LPM2.addPass(LoopFullUnrollPass(Level.getSpeedupLevel(),
                                    /* OnlyWhenForced= */ !PTO.LoopUnrolling,
                                    PTO.ForgetAllSCEVInLoopUnroll));
  LPM2.addPass(LoopBoundSplitPass());

I found some failures from it and I fixed them. At this moment, there is no failure from llvm-test-suite and spec bencharmarks with enabling this pass as above.

Maybe, I will try to enable this pass in the pipeline of new pass manager later. If you have a idea about the location of this pass, please let me know. It will be very helpful.

After updating code following your comments, I will push this patch.



================
Comment at: llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp:32
+
+struct ConditionInfo {
+  /// Branch instruction with this condition
----------------
mkazantsev wrote:
> Please lock it in anonymous namespace (see how it's done e.g. in InstSimplifypass.cpp), https://llvm.org/docs/CodingStandards.html#anonymous-namespaces
> 
> 
Yep, I will update it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102234/new/

https://reviews.llvm.org/D102234



More information about the llvm-commits mailing list