[all-commits] [llvm/llvm-project] 0074a4: [LoopInterchange] Hoist isComputableLoopNest() in ...

Madhur Amilkanthwar via All-commits all-commits at lists.llvm.org
Wed Feb 5 00:20:39 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0074a462f1e62ed1df4ac13107043305ba7b8781
      https://github.com/llvm/llvm-project/commit/0074a462f1e62ed1df4ac13107043305ba7b8781
  Author: Madhur Amilkanthwar <madhura at nvidia.com>
  Date:   2025-02-05 (Wed, 05 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
    A llvm/test/Transforms/LoopInterchange/no-dependence-info.ll
    M llvm/test/Transforms/LoopInterchange/pr43326-ideal-access-pattern.ll
    M llvm/test/Transforms/LoopInterchange/pr43326.ll
    M llvm/test/Transforms/LoopInterchange/pr48212.ll
    M llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll

  Log Message:
  -----------
  [LoopInterchange] Hoist isComputableLoopNest() in the control flow (#124247)

The profiling of the LLVM Test-suite reveals that a significant portion,
specifically 14,090 out of 139,323, loop nests were identified as
non-viable candidates for transformation, leading to the transform
exiting from isComputableLoopNest() without any action.

More importantly, dependence information was computed for these loop
nests before reaching the function isComputableLoopNest(), which does
not require DI and relies solely on scalar evolution (SE).

To enhance compile-time efficiency, this patch moves the call to
isComputableLoopNest() earlier in the control-flow, thereby avoiding
unnecessary dependence calculations.

The impact of this change is evident on the compile-time-tracker, with
the overall geometric mean improvement recorded at 0.11%, while the
lencode benchmark gets a more substantial benefit of 0.44%.
This improvement can be tracked in the isc-ln-exp-2 branch under my
repo.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list