Hexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
[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 "MCTargetDesc/HexagonMCTargetDesc.h"
19 #include "llvm/Target/TargetLowering.h"
20 #include "llvm/Target/TargetMachine.h"
21
22 namespace llvm {
23   class FunctionPass;
24   class ModulePass;
25   class TargetMachine;
26   class MachineInstr;
27   class HexagonMCInst;
28   class HexagonAsmPrinter;
29   class HexagonTargetMachine;
30   class raw_ostream;
31
32   FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM,
33                                      CodeGenOpt::Level OptLevel);
34   FunctionPass *createHexagonDelaySlotFillerPass(TargetMachine &TM);
35   FunctionPass *createHexagonFPMoverPass(TargetMachine &TM);
36   FunctionPass *createHexagonRemoveExtendOps(HexagonTargetMachine &TM);
37   FunctionPass *createHexagonCFGOptimizer(HexagonTargetMachine &TM);
38
39   FunctionPass *createHexagonSplitTFRCondSets(HexagonTargetMachine &TM);
40   FunctionPass *createHexagonExpandPredSpillCode(HexagonTargetMachine &TM);
41
42   FunctionPass *createHexagonHardwareLoops();
43   FunctionPass *createHexagonPeephole();
44   FunctionPass *createHexagonFixupHwLoops();
45   FunctionPass *createHexagonPacketizer();
46   FunctionPass *createHexagonNewValueJump();
47
48
49 /* TODO: object output.
50   MCCodeEmitter *createHexagonMCCodeEmitter(const Target &,
51                                             TargetMachine &TM,
52                                             MCContext &Ctx);
53 */
54 /* TODO: assembler input.
55   TargetAsmBackend *createHexagonAsmBackend(const Target &,
56                                                   const std::string &);
57 */
58   void HexagonLowerToMC(const MachineInstr *MI, HexagonMCInst &MCI,
59                         HexagonAsmPrinter &AP);
60 } // end namespace llvm;
61
62 #define Hexagon_POINTER_SIZE 4
63
64 #define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
65 #define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
66 #define Hexagon_WordSize Hexagon_PointerSize
67 #define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
68
69 // allocframe saves LR and FP on stack before allocating
70 // a new stack frame. This takes 8 bytes.
71 #define HEXAGON_LRFP_SIZE 8
72
73 // Normal instruction size (in bytes).
74 #define HEXAGON_INSTR_SIZE 4
75
76 // Maximum number of words and instructions in a packet.
77 #define HEXAGON_PACKET_SIZE 4
78
79 #endif