2 //***************************************************************************
9 // 7/23/01 - Vikram Adve - Created
10 //***************************************************************************
12 #ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H
13 #define LLVM_CODEGEN_INSTR_SCHEDULING_H
16 //************************ User Include Files *****************************/
18 #include "llvm/Support/CommandLine.h"
19 #include "llvm/CodeGen/TargetMachine.h"
21 //************************ Opaque Declarations*****************************/
24 class SchedulingManager;
26 //************************ Exported Data Types *****************************/
28 // Debug option levels for instruction scheduling
29 enum SchedDebugLevel_t {
31 Sched_PrintMachineCode,
32 Sched_PrintSchedTrace,
33 Sched_PrintSchedGraphs,
36 extern cl::Enum<SchedDebugLevel_t> SchedDebugLevel;
39 //************************** External Classes ******************************/
42 //************************* External Functions *****************************/
45 //---------------------------------------------------------------------------
46 // Function: ScheduleInstructionsWithSSA
49 // Entry point for instruction scheduling on SSA form.
50 // Schedules the machine instructions generated by instruction selection.
51 // Assumes that register allocation has not been done, i.e., operands
52 // are still in SSA form.
53 //---------------------------------------------------------------------------
55 bool ScheduleInstructionsWithSSA (Method* method,
56 const TargetMachine &Target);
59 //---------------------------------------------------------------------------
60 // Function: ScheduleInstructions
63 // Entry point for instruction scheduling on machine code.
64 // Schedules the machine instructions generated by instruction selection.
65 // Assumes that register allocation has been done.
66 //---------------------------------------------------------------------------
68 // Not implemented yet.
69 bool ScheduleInstructions (Method* method,
70 const TargetMachine &Target);
72 //---------------------------------------------------------------------------
73 // Function: instrIsFeasible
76 // Used by the priority analysis to filter out instructions
77 // that are not feasible to issue in the current cycle.
78 // Should only be used during schedule construction..
79 //---------------------------------------------------------------------------
81 bool instrIsFeasible (const SchedulingManager& S,
82 MachineOpCode opCode);
84 //**************************************************************************/