LLVM API Documentation

Hexagon.h
Go to the documentation of this file.
00001 //=-- Hexagon.h - Top-level interface for Hexagon representation --*- C++ -*-=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains the entry points for global functions defined in the LLVM
00011 // Hexagon back-end.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
00016 #define LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
00017 
00018 #include "MCTargetDesc/HexagonMCTargetDesc.h"
00019 #include "llvm/Target/TargetLowering.h"
00020 #include "llvm/Target/TargetMachine.h"
00021 
00022 namespace llvm {
00023   class FunctionPass;
00024   class ModulePass;
00025   class TargetMachine;
00026   class MachineInstr;
00027   class HexagonMCInst;
00028   class HexagonAsmPrinter;
00029   class HexagonTargetMachine;
00030   class raw_ostream;
00031 
00032   FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM,
00033                                      CodeGenOpt::Level OptLevel);
00034   FunctionPass *createHexagonDelaySlotFillerPass(const TargetMachine &TM);
00035   FunctionPass *createHexagonFPMoverPass(const TargetMachine &TM);
00036   FunctionPass *createHexagonRemoveExtendArgs(const HexagonTargetMachine &TM);
00037   FunctionPass *createHexagonCFGOptimizer(const HexagonTargetMachine &TM);
00038 
00039   FunctionPass *createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM);
00040   FunctionPass *createHexagonSplitConst32AndConst64(
00041                       const HexagonTargetMachine &TM);
00042   FunctionPass *createHexagonExpandPredSpillCode(
00043                       const HexagonTargetMachine &TM);
00044   FunctionPass *createHexagonHardwareLoops();
00045   FunctionPass *createHexagonPeephole();
00046   FunctionPass *createHexagonFixupHwLoops();
00047   FunctionPass *createHexagonNewValueJump();
00048   FunctionPass *createHexagonCopyToCombine();
00049   FunctionPass *createHexagonPacketizer();
00050   FunctionPass *createHexagonNewValueJump();
00051 
00052 /* TODO: object output.
00053   MCCodeEmitter *createHexagonMCCodeEmitter(const Target &,
00054                                             const TargetMachine &TM,
00055                                             MCContext &Ctx);
00056 */
00057 /* TODO: assembler input.
00058   TargetAsmBackend *createHexagonAsmBackend(const Target &,
00059                                                   const std::string &);
00060 */
00061   void HexagonLowerToMC(const MachineInstr *MI, HexagonMCInst &MCI,
00062                         HexagonAsmPrinter &AP);
00063 } // end namespace llvm;
00064 
00065 #define Hexagon_POINTER_SIZE 4
00066 
00067 #define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
00068 #define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
00069 #define Hexagon_WordSize Hexagon_PointerSize
00070 #define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
00071 
00072 // allocframe saves LR and FP on stack before allocating
00073 // a new stack frame. This takes 8 bytes.
00074 #define HEXAGON_LRFP_SIZE 8
00075 
00076 // Normal instruction size (in bytes).
00077 #define HEXAGON_INSTR_SIZE 4
00078 
00079 // Maximum number of words and instructions in a packet.
00080 #define HEXAGON_PACKET_SIZE 4
00081 
00082 #endif