Structures used to hold scheduling information.
[oota-llvm.git] / include / llvm / Target / TargetInstrItineraries.h
1 //===-- llvm/Target/TargetInstrItineraries.h - Scheduling -------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the James M. Laskey and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file describes the structures used for instruction itineraries and
11 // states.  This is used by schedulers to determine instruction states and
12 // latencies.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_TARGET_TARGETINSTRITINERARIES_H
17 #define LLVM_TARGET_TARGETINSTRITINERARIES_H
18
19 namespace llvm {
20
21 //===----------------------------------------------------------------------===//
22 // Instruction stage - These values represent a step in the execution of an
23 // instruction.  The latency represents the number of discrete time slots used
24 // need to complete the stage.  Units represent the choice of functional units
25 // that can be used to complete the stage.  Eg. IntUnit1, IntUnit2.
26 //
27 struct InstrStage {
28   unsigned Cycles;  // Length of stage in machine cycles
29   unsigned Units;   // Choice of functional units
30 };
31
32
33 //===----------------------------------------------------------------------===//
34 // Instruction itinerary - An itinerary represents a sequential series of steps
35 // required to complete an instruction.  Itineraries are represented as
36 // sequences of instruction stages.
37 //
38 struct InstrItinerary {
39   unsigned First;    // Index of first stage in itinerary
40   unsigned Last;     // Index of last + 1 stage in itinerary
41 };
42
43
44 } // End llvm namespace
45
46 #endif