Hexagon backend support
[oota-llvm.git] / lib / Target / Hexagon / Hexagon.h
1 //=-- Hexagon.h - Top-level interface for Hexagon representation --*- C++ -*-=//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the entry points for global functions defined in the LLVM
11 // Hexagon back-end.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef TARGET_Hexagon_H
16 #define TARGET_Hexagon_H
17
18 #include <cassert>
19 #include "llvm/Target/TargetLowering.h"
20
21 namespace llvm {
22   class FunctionPass;
23   class TargetMachine;
24   class HexagonTargetMachine;
25   class raw_ostream;
26
27   FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM);
28   FunctionPass *createHexagonDelaySlotFillerPass(TargetMachine &TM);
29   FunctionPass *createHexagonFPMoverPass(TargetMachine &TM);
30   FunctionPass *createHexagonRemoveExtendOps(HexagonTargetMachine &TM);
31   FunctionPass *createHexagonCFGOptimizer(HexagonTargetMachine &TM);
32
33   FunctionPass* createHexagonSplitTFRCondSets(HexagonTargetMachine &TM);
34   FunctionPass* createHexagonExpandPredSpillCode(HexagonTargetMachine &TM);
35
36   FunctionPass *createHexagonHardwareLoops();
37   FunctionPass *createHexagonOptimizeSZExtends();
38   FunctionPass *createHexagonFixupHwLoops();
39
40   extern Target TheHexagonTarget;
41
42 } // end namespace llvm;
43
44 // Defines symbolic names for Hexagon instructions and registers.
45 // This defines a mapping from register name to register number.
46 //
47
48 #define GET_REGINFO_ENUM
49 #include "HexagonGenRegisterInfo.inc"
50
51 #define GET_INSTRINFO_ENUM
52 #include "HexagonGenInstrInfo.inc"
53
54 #define GET_SUBTARGETINFO_ENUM
55 #include "HexagonGenSubtargetInfo.inc"
56
57 #define Hexagon_POINTER_SIZE 4
58
59 #define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
60 #define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
61 #define Hexagon_WordSize Hexagon_PointerSize
62 #define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
63
64 // allocframe saves LR and FP on stack before allocating
65 // a new stack frame. This takes 8 bytes.
66 #define HEXAGON_LRFP_SIZE 8
67
68 #endif