OSDN Git Service

MachineScheduler: Refactor setPolicy() to limit computing remaining latency
authorTom Stellard <tstellar@redhat.com>
Tue, 21 Aug 2018 21:48:43 +0000 (21:48 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 21 Aug 2018 21:48:43 +0000 (21:48 +0000)
commit486f7d6d9f818f6ad654f9f2e98a68cba2b62cb6
tree98634c1ae97eb123123a0adda61dfcae2d8707d0
parent461110262a69e42e93f15f0b96451fc2f6eb1006
MachineScheduler: Refactor setPolicy() to limit computing remaining latency

Summary:
Computing the remaining latency can be very expensive especially
on graphs of N nodes where the number of edges approaches N^2.

This reduces the compile time of a pathological case with the
AMDGPU backend from ~7.5 seconds to ~3 seconds.  This test case has
a basic block with 2655 stores, each with somewhere between 500
and 1500 successors and predecessors.

Reviewers: atrick, MatzeB, airlied, mareko

Reviewed By: mareko

Subscribers: tpr, javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340346 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineScheduler.h
lib/CodeGen/MachineScheduler.cpp