Implementation of instruction scheduling for LLVM.
[oota-llvm.git] / include / llvm / CodeGen / InstrScheduling.h
1 // $Id$
2 //***************************************************************************
3 // File:
4 //      InstrScheduling.h
5 // 
6 // Purpose:
7 //      
8 // History:
9 //      7/23/01  -  Vikram Adve  -  Created
10 //***************************************************************************
11
12 #ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H
13 #define LLVM_CODEGEN_INSTR_SCHEDULING_H
14
15
16 //************************ User Include Files *****************************/
17
18 #include "llvm/Support/CommandLine.h"
19 #include "llvm/CodeGen/TargetMachine.h"
20
21 //************************ Opaque Declarations*****************************/
22
23 class Method;
24 class SchedulingManager;
25
26 //************************ Exported Data Types *****************************/
27
28 // Debug option levels for instruction scheduling
29 enum SchedDebugLevel_t {
30   Sched_NoDebugInfo,
31   Sched_PrintMachineCode, 
32   Sched_PrintSchedTrace,
33   Sched_PrintSchedGraphs,
34 };
35
36 extern cl::Enum<SchedDebugLevel_t> SchedDebugLevel;
37
38
39 //************************** External Classes ******************************/
40
41
42 //************************* External Functions *****************************/
43
44
45 //---------------------------------------------------------------------------
46 // Function: ScheduleInstructionsWithSSA
47 // 
48 // Purpose:
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 //---------------------------------------------------------------------------
54
55 bool            ScheduleInstructionsWithSSA     (Method* method,
56                                                  const TargetMachine &Target);
57
58
59 //---------------------------------------------------------------------------
60 // Function: ScheduleInstructions
61 // 
62 // Purpose:
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 //---------------------------------------------------------------------------
67
68 // Not implemented yet.
69 bool            ScheduleInstructions            (Method* method,
70                                                  const TargetMachine &Target);
71
72 //---------------------------------------------------------------------------
73 // Function: instrIsFeasible
74 // 
75 // Purpose:
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 //---------------------------------------------------------------------------
80
81 bool            instrIsFeasible                 (const SchedulingManager& S,
82                                                  MachineOpCode opCode);
83
84 //**************************************************************************/
85
86 #endif