[all-commits] [llvm/llvm-project] b6bf40: [llvm][CodeGen] Add a new software pipeliner 'Wind...

Hua Tian via All-commits all-commits at lists.llvm.org
Thu Jun 13 02:51:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6bf4024a031a5e7b58aff1425d94841a88002d6
      https://github.com/llvm/llvm-project/commit/b6bf4024a031a5e7b58aff1425d94841a88002d6
  Author: Hua Tian <akiratian at tencent.com>
  Date:   2024-06-13 (Thu, 13 Jun 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachinePipeliner.h
    M llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
    A llvm/include/llvm/CodeGen/WindowScheduler.h
    M llvm/lib/CodeGen/CMakeLists.txt
    M llvm/lib/CodeGen/MachinePipeliner.cpp
    A llvm/lib/CodeGen/WindowScheduler.cpp
    A llvm/test/CodeGen/Hexagon/swp-ws-dead-def.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-exp-dbg.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-exp.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-fail-0.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-fail-1.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-meta-instr.mir
    A llvm/test/CodeGen/Hexagon/swp-ws-sqrt.mir

  Log Message:
  -----------
  [llvm][CodeGen] Add a new software pipeliner 'Window Scheduler' (#84443)

This commit implements the Window Scheduler as described in the RFC:

https://discourse.llvm.org/t/rfc-window-scheduling-algorithm-for-machinepipeliner-in-llvm/74718

This Window Scheduler implements the window algorithm designed by
Steven Muchnick in the book "Advanced Compiler Design And
Implementation",
with some improvements:

1. Copy 3 times of the loop kernel and construct the corresponding DAG
   to identify dependencies between MIs;
2. Use heuristic algorithm to obtain a set of window offsets.

The window algorithm is equivalent to modulo scheduling algorithm with a
stage of 2. It is mainly applied in targets where hardware resource
conflicts are severe, and the SMS algorithm often fails in such cases.
On our own DSA, this window algorithm typically can achieve a
performance
improvement of over 10%.

Co-authored-by: Kai Yan <aklkaiyan at tencent.com>
Co-authored-by: Ran Xiao <lennyxiao at tencent.com>

---------

Co-authored-by: Kai Yan <aklkaiyan at tencent.com>
Co-authored-by: Ran Xiao <lennyxiao at tencent.com>



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