mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
54e4c36a73
The Cost field is removed. It was only being used in a very limited way, to indicate when the scheduler should attempt to protect a live register, and it isn't really needed to do that. If we ever want the scheduler to start inserting copies in non-prohibitive situations, we'll have to rethink some things anyway. A Latency field is added. Instead of giving each node a single fixed latency, each edge can have its own latency. This will eventually be used to model various micro-architecture properties more accurately. The PointerIntPair class and an internal union are now used, which reduce the overall size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60806 91177308-0d34-0410-b5e6-96231b3b80d8
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
//==- llvm/CodeGen/ScheduleDAGInstrs.h - MachineInstr Scheduling -*- C++ -*-==//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements the ScheduleDAGInstrs class, which implements
|
|
// scheduling for a MachineInstr-based dependency graph.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CODEGEN_SCHEDULEDAGINSTRS_H
|
|
#define LLVM_CODEGEN_SCHEDULEDAGINSTRS_H
|
|
|
|
#include "llvm/CodeGen/ScheduleDAG.h"
|
|
|
|
namespace llvm {
|
|
class ScheduleDAGInstrs : public ScheduleDAG {
|
|
public:
|
|
ScheduleDAGInstrs(MachineBasicBlock *bb,
|
|
const TargetMachine &tm);
|
|
|
|
virtual ~ScheduleDAGInstrs() {}
|
|
|
|
/// NewSUnit - Creates a new SUnit and return a ptr to it.
|
|
///
|
|
SUnit *NewSUnit(MachineInstr *MI) {
|
|
SUnits.push_back(SUnit(MI, (unsigned)SUnits.size()));
|
|
SUnits.back().OrigNode = &SUnits.back();
|
|
return &SUnits.back();
|
|
}
|
|
|
|
/// BuildSchedUnits - Build SUnits from the MachineBasicBlock that we are
|
|
/// input.
|
|
virtual void BuildSchedUnits();
|
|
|
|
/// ComputeLatency - Compute node latency.
|
|
///
|
|
virtual void ComputeLatency(SUnit *SU);
|
|
|
|
virtual MachineBasicBlock *EmitSchedule();
|
|
|
|
/// Schedule - Order nodes according to selected style, filling
|
|
/// in the Sequence member.
|
|
///
|
|
virtual void Schedule() = 0;
|
|
|
|
virtual void dumpNode(const SUnit *SU) const;
|
|
|
|
virtual std::string getGraphNodeLabel(const SUnit *SU) const;
|
|
};
|
|
}
|
|
|
|
#endif
|