Various bits of framework needed for precise machine-level selection
authorAndrew Trick <atrick@apple.com>
Fri, 24 Dec 2010 05:03:26 +0000 (05:03 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 24 Dec 2010 05:03:26 +0000 (05:03 +0000)
commit2da8bc8a5f7705ac131184cd247f48500da0d74e
treecff1dbbc4e29f2b8be4c46e8454fe29228daeecb
parent6e8f4c404825b79f9b9176483653f1aa927dfbde
Various bits of framework needed for precise machine-level selection
DAG scheduling during isel. Most new functionality is currently
guarded by -enable-sched-cycles and -enable-sched-hazard.

Added InstrItineraryData::IssueWidth field, currently derived from
ARM itineraries, but could be initialized differently on other targets.

Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is
active, and if so how many cycles of state it holds.

Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry
into the scheduler's available queue.

ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to
get information about it's SUnits, provides RecedeCycle for bottom-up
scheduling, correctly computes scoreboard depth, tracks IssueCount, and
considers potential stall cycles when checking for hazards.

ScheduleDAGRRList now models machine cycles and hazards (under
flags). It tracks MinAvailableCycle, drives the hazard recognizer and
priority queue's ready filter, manages a new PendingQueue, properly
accounts for stall cycles, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122541 91177308-0d34-0410-b5e6-96231b3b80d8
31 files changed:
include/llvm/CodeGen/LatencyPriorityQueue.h
include/llvm/CodeGen/ScheduleDAG.h
include/llvm/CodeGen/ScheduleHazardRecognizer.h
include/llvm/CodeGen/ScoreboardHazardRecognizer.h
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/Target/TargetInstrInfo.h
include/llvm/Target/TargetInstrItineraries.h
lib/CodeGen/LatencyPriorityQueue.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/ScheduleDAG.cpp
lib/CodeGen/ScoreboardHazardRecognizer.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/TargetInstrInfoImpl.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMHazardRecognizer.cpp
lib/Target/ARM/ARMHazardRecognizer.h
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMSubtarget.h
lib/Target/CellSPU/SPUHazardRecognizers.cpp
lib/Target/CellSPU/SPUHazardRecognizers.h
lib/Target/CellSPU/SPUISelDAGToDAG.cpp
lib/Target/CellSPU/SPUInstrInfo.cpp
lib/Target/CellSPU/SPUInstrInfo.h
lib/Target/PowerPC/PPCHazardRecognizers.cpp
lib/Target/PowerPC/PPCHazardRecognizers.h
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h