[PATCH] D93734: [LoopDeletion] Insert an early exit from dead path in loop

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 06:54:25 PST 2021


fhahn added a comment.

In D93734#2478272 <https://reviews.llvm.org/D93734#2478272>, @jonpa wrote:

> I found out quickly that perhaps the hardest part of this was to update datastructures after changing the CFG in a loop... I have barely been able to build the benchmarks as it is, so I am in need of some good advice on how to update things after a loop change, for this patch to be usable. Currently I have changed things temporarily so that LI, DT, etc are recomputed after loop deletion (BTW, I found that only recomputing those analyses on master after LoopDeletion was not NFC, which surprised me... Is that a bug or expected with the aim to save compile time?)
>
> Statistics on SPEC-17 on SystemZ:

Thanks for the update Jonas! It looks like the patch includes some required changes that still landed (D86844 <https://reviews.llvm.org/D86844>), which might impact the number of removed loops. It might be good to re-collect the statistics. I tried to collect stats with this patch on SPEC2000/SPEC2006/MultiSource for X86 with LTO, but unfortunately there have been a few crashes.

> @jdoerfert:
>
>> FWIW, I my goal is to make it something driven by a generic analysis, not another pattern we match.
>
> I agree with that, I have now made the patch more general.

I think both this patch and  D93764 <https://reviews.llvm.org/D93764> require very similar analysis to find 'no-op' paths through loops (with the difference that  partial unswitching can allow stores to memory that does not clobber the condition). Do you think it would be worth unifying the analysis code?


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

https://reviews.llvm.org/D93734



More information about the llvm-commits mailing list