[all-commits] [llvm/llvm-project] 116838: [MachinePipeliner] Fix the interpretation of the s...

ytmukai via All-commits all-commits at lists.llvm.org
Thu Sep 15 18:26:37 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 116838b1516a0c856b476061d7d8c938281e147c
      https://github.com/llvm/llvm-project/commit/116838b1516a0c856b476061d7d8c938281e147c
  Author: Yuta Mukai <mukai.yuta at fujitsu.com>
  Date:   2022-09-16 (Fri, 16 Sep 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachinePipeliner.h
    M llvm/lib/CodeGen/MachinePipeliner.cpp
    M llvm/test/CodeGen/PowerPC/sms-iterator.ll
    M llvm/test/CodeGen/PowerPC/sms-phi-1.ll
    M llvm/test/CodeGen/PowerPC/sms-phi-2.ll
    M llvm/test/CodeGen/Thumb2/mve-pipelineloops.ll
    M llvm/test/CodeGen/Thumb2/swp-exitbranchdir.mir
    M llvm/test/CodeGen/Thumb2/swp-fixedii-le.mir
    M llvm/test/CodeGen/Thumb2/swp-fixedii.mir
    M llvm/test/CodeGen/Thumb2/swp-regpressure.mir

  Log Message:
  -----------
  [MachinePipeliner] Fix the interpretation of the scheduling model

The method of counting resource consumption is modified to be based on
"Cycles" value when DFA is not used.

The calculation of ResMII is modified to total "Cycles" and divide it
by the number of units for each resource. Previously, ResMII was
excessive because it was assumed that resources were consumed for
the cycles of "Latency" value.

The method of resource reservation is modified similarly. When a
value of "Cycles" is larger than 1, the resource is considered to be
consumed by 1 for cycles of its length from the scheduled cycle.
To realize this, ResourceManager maintains a resource table for all
slots. Previously, resource consumption was always 1 for 1 cycle
regardless of the value of "Cycles" or "Latency".

In addition, the number of micro operations per cycle is modified to
be constrained by "IssueWidth". To disable the constraint,
--pipeliner-force-issue-width=100 can be used.

For the case of using DFA, the scheduling results are unchanged.

Reviewed By: dpenry

Differential Revision: https://reviews.llvm.org/D133572




More information about the All-commits mailing list