#include "llvm/CodeGen/DFAPacketizer.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBundle.h"
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <iterator>
#include <memory>
#include <vector>
usingnamespacellvm;
#define DEBUG_TYPE …
static cl::opt<unsigned> InstrLimit("dfa-instr-limit", cl::Hidden,
cl::init(0), cl::desc("If present, stops packetizing after N instructions"));
static unsigned InstrCount = …;
bool DFAPacketizer::canReserveResources(const MCInstrDesc *MID) { … }
void DFAPacketizer::reserveResources(const MCInstrDesc *MID) { … }
bool DFAPacketizer::canReserveResources(MachineInstr &MI) { … }
void DFAPacketizer::reserveResources(MachineInstr &MI) { … }
unsigned DFAPacketizer::getUsedResources(unsigned InstIdx) { … }
DefaultVLIWScheduler::DefaultVLIWScheduler(MachineFunction &MF,
MachineLoopInfo &MLI,
AAResults *AA)
: … { … }
void DefaultVLIWScheduler::postProcessDAG() { … }
void DefaultVLIWScheduler::schedule() { … }
VLIWPacketizerList::VLIWPacketizerList(MachineFunction &mf,
MachineLoopInfo &mli, AAResults *aa)
: … { … }
VLIWPacketizerList::~VLIWPacketizerList() { … }
void VLIWPacketizerList::endPacket(MachineBasicBlock *MBB,
MachineBasicBlock::iterator MI) { … }
void VLIWPacketizerList::PacketizeMIs(MachineBasicBlock *MBB,
MachineBasicBlock::iterator BeginItr,
MachineBasicBlock::iterator EndItr) { … }
bool VLIWPacketizerList::alias(const MachineMemOperand &Op1,
const MachineMemOperand &Op2,
bool UseTBAA) const { … }
bool VLIWPacketizerList::alias(const MachineInstr &MI1,
const MachineInstr &MI2,
bool UseTBAA) const { … }
void VLIWPacketizerList::addMutation(
std::unique_ptr<ScheduleDAGMutation> Mutation) { … }