LLVM  3.7.0
Hexagon.h
Go to the documentation of this file.
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 LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
16 #define LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
17 
18 #define Hexagon_POINTER_SIZE 4
19 
20 #define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
21 #define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
22 #define Hexagon_WordSize Hexagon_PointerSize
23 #define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
24 
25 // allocframe saves LR and FP on stack before allocating
26 // a new stack frame. This takes 8 bytes.
27 #define HEXAGON_LRFP_SIZE 8
28 
29 // Normal instruction size (in bytes).
30 #define HEXAGON_INSTR_SIZE 4
31 
32 // Maximum number of words and instructions in a packet.
33 #define HEXAGON_PACKET_SIZE 4
34 #define HEXAGON_MAX_PACKET_SIZE (HEXAGON_PACKET_SIZE * HEXAGON_INSTR_SIZE)
35 // Minimum number of instructions in an end-loop packet.
36 #define HEXAGON_PACKET_INNER_SIZE 2
37 #define HEXAGON_PACKET_OUTER_SIZE 3
38 // Maximum number of instructions in a packet before shuffling,
39 // including a compound one or a duplex or an extender.
40 #define HEXAGON_PRESHUFFLE_PACKET_SIZE (HEXAGON_PACKET_SIZE + 3)
41 
42 // Name of the global offset table as defined by the Hexagon ABI
43 #define HEXAGON_GOT_SYM_NAME "_GLOBAL_OFFSET_TABLE_"
44 
48 
49 namespace llvm {
50  class MachineInstr;
51  class MCInst;
52  class MCInstrInfo;
53  class HexagonAsmPrinter;
54  class HexagonTargetMachine;
55 
56  void HexagonLowerToMC(const MachineInstr *MI, MCInst &MCI,
57  HexagonAsmPrinter &AP);
58 
59  /// \brief Creates a Hexagon-specific Target Transformation Info pass.
60  ImmutablePass *createHexagonTargetTransformInfoPass(const HexagonTargetMachine *TM);
61 } // end namespace llvm;
62 
63 #endif
void HexagonLowerToMC(const MachineInstr *MI, MCInst &MCI, HexagonAsmPrinter &AP)
ImmutablePass * createHexagonTargetTransformInfoPass(const HexagonTargetMachine *TM)
Creates a Hexagon-specific Target Transformation Info pass.
This file describes how to lower LLVM code to machine code.