2001-09-07 21:04:59 +00:00
|
|
|
// $Id$ -*- C++ -*-
|
2001-08-28 23:07:19 +00:00
|
|
|
//***************************************************************************
|
|
|
|
// File:
|
|
|
|
// InstrScheduling.h
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
// History:
|
|
|
|
// 7/23/01 - Vikram Adve - Created
|
|
|
|
//***************************************************************************
|
|
|
|
|
|
|
|
#ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H
|
|
|
|
#define LLVM_CODEGEN_INSTR_SCHEDULING_H
|
|
|
|
|
2001-09-07 21:04:59 +00:00
|
|
|
#include "llvm/CodeGen/MachineInstr.h"
|
2001-11-27 00:03:19 +00:00
|
|
|
#include "Support/CommandLine.h"
|
2001-08-28 23:07:19 +00:00
|
|
|
|
|
|
|
class Method;
|
|
|
|
class SchedulingManager;
|
2001-09-07 21:04:59 +00:00
|
|
|
class TargetMachine;
|
2001-09-14 04:32:38 +00:00
|
|
|
class MachineSchedInfo;
|
2001-08-28 23:07:19 +00:00
|
|
|
|
|
|
|
// Debug option levels for instruction scheduling
|
|
|
|
enum SchedDebugLevel_t {
|
|
|
|
Sched_NoDebugInfo,
|
|
|
|
Sched_PrintMachineCode,
|
|
|
|
Sched_PrintSchedTrace,
|
|
|
|
Sched_PrintSchedGraphs,
|
|
|
|
};
|
|
|
|
|
|
|
|
extern cl::Enum<SchedDebugLevel_t> SchedDebugLevel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Function: ScheduleInstructionsWithSSA
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
// Entry point for instruction scheduling on SSA form.
|
|
|
|
// Schedules the machine instructions generated by instruction selection.
|
|
|
|
// Assumes that register allocation has not been done, i.e., operands
|
|
|
|
// are still in SSA form.
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
2001-09-18 12:41:43 +00:00
|
|
|
bool ScheduleInstructionsWithSSA(Method* method, const TargetMachine &Target);
|
|
|
|
|
2001-08-28 23:07:19 +00:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Function: ScheduleInstructions
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
// Entry point for instruction scheduling on machine code.
|
|
|
|
// Schedules the machine instructions generated by instruction selection.
|
|
|
|
// Assumes that register allocation has been done.
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Not implemented yet.
|
|
|
|
bool ScheduleInstructions (Method* method,
|
|
|
|
const TargetMachine &Target);
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Function: instrIsFeasible
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
// Used by the priority analysis to filter out instructions
|
|
|
|
// that are not feasible to issue in the current cycle.
|
|
|
|
// Should only be used during schedule construction..
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool instrIsFeasible (const SchedulingManager& S,
|
|
|
|
MachineOpCode opCode);
|
|
|
|
#endif
|