[PATCH] D106056: [CVP] processSwitch: Remove default case when switch cover all possible values.

Alexander Kornienko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 04:45:59 PDT 2021


alexfh added a comment.

In D106056#3024018 <https://reviews.llvm.org/D106056#3024018>, @junparser wrote:

> In D106056#3023813 <https://reviews.llvm.org/D106056#3023813>, @junparser wrote:
>
>> In D106056#3023777 <https://reviews.llvm.org/D106056#3023777>, @xbolva00 wrote:
>>
>>> In D106056#3023709 <https://reviews.llvm.org/D106056#3023709>, @alexfh wrote:
>>>
>>>> We'd appreciate a prompt fix or a workaround. If neither is possible, please revert the commit while working on a proper solution.
>>>
>>> Well, it is not "common" code, switch 1000 cases. But easy fix is probably to introduce some reasonable limit when to bail out.
>>
>> switch 1000 cases is not the issue, use loop induction variable as condition is.  It cause LVI recursive call SolveBlockValue.
>
> @xbolva00  I was wrong.  The compiler time regression is caused by  CodeGen Passes rather than CVP or LVI.

This conclusion corresponds with the profile in my earlier comment (e.g. this line: `80.96% (anonymous namespace)::MachineBlockPlacement::buildLoopChains`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106056



More information about the llvm-commits mailing list