[all-commits] [llvm/llvm-project] 68dee8: [MachinePipeliner] Fix unscheduled instruction

RoboTux via All-commits all-commits at lists.llvm.org
Thu May 5 08:01:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68dee83923c4cfa09a8cf81399a7bc77ca6bd811
      https://github.com/llvm/llvm-project/commit/68dee83923c4cfa09a8cf81399a7bc77ca6bd811
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M llvm/lib/CodeGen/MachinePipeliner.cpp

  Log Message:
  -----------
  [MachinePipeliner] Fix unscheduled instruction

Prior to ordering instructions to be scheduled, the machine pipeliner
update recurrence node sets in groupRemainingNodes() by adding in a
given node set any node on the dependency path from a node set with
higher priority to the given node set. The function computePath() that
determine what constitutes a path follows artificial dependencies.

However, when ordering the nodes in the resulting node sets,
computeNodeOrder() calls ignoreDependence when looking at dependencies
which ignores artificial dependencies. This can cause a node not to be
scheduled which then causes wrong code generation and in the case of a
debug build will lead to an assert failure in generatePhis() in
ModuloScheduler.cpp.

This commit adds calls to ignoreDependence() in computePath() to not add
any node in groupRemainingNodes() that would not be ordered by
computeNodeOrder().

Reviewed By: sgundapa

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




More information about the All-commits mailing list