2011-12-12 22:14:40 +01:00
|
|
|
//=-- Hexagon.h - Top-level interface for Hexagon representation --*- C++ -*-=//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the LLVM
|
|
|
|
// Hexagon back-end.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef TARGET_Hexagon_H
|
|
|
|
#define TARGET_Hexagon_H
|
|
|
|
|
2011-12-15 23:29:08 +01:00
|
|
|
#include "MCTargetDesc/HexagonMCTargetDesc.h"
|
2011-12-12 22:14:40 +01:00
|
|
|
#include "llvm/Target/TargetLowering.h"
|
2012-04-12 19:55:53 +02:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2011-12-12 22:14:40 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class FunctionPass;
|
|
|
|
class TargetMachine;
|
2012-04-12 19:55:53 +02:00
|
|
|
class MachineInstr;
|
|
|
|
class MCInst;
|
|
|
|
class HexagonAsmPrinter;
|
2011-12-12 22:14:40 +01:00
|
|
|
class HexagonTargetMachine;
|
|
|
|
class raw_ostream;
|
|
|
|
|
|
|
|
FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonDelaySlotFillerPass(TargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonFPMoverPass(TargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonRemoveExtendOps(HexagonTargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonCFGOptimizer(HexagonTargetMachine &TM);
|
|
|
|
|
2012-04-12 19:55:53 +02:00
|
|
|
FunctionPass *createHexagonSplitTFRCondSets(HexagonTargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonExpandPredSpillCode(HexagonTargetMachine &TM);
|
2012-05-14 21:35:42 +02:00
|
|
|
|
2011-12-12 22:14:40 +01:00
|
|
|
FunctionPass *createHexagonHardwareLoops();
|
2012-02-15 19:52:27 +01:00
|
|
|
FunctionPass *createHexagonPeephole();
|
2011-12-12 22:14:40 +01:00
|
|
|
FunctionPass *createHexagonFixupHwLoops();
|
2012-05-03 23:52:53 +02:00
|
|
|
FunctionPass *createHexagonPacketizer();
|
2012-05-12 07:10:30 +02:00
|
|
|
FunctionPass *createHexagonNewValueJump();
|
|
|
|
|
2011-12-12 22:14:40 +01:00
|
|
|
|
2012-04-12 19:55:53 +02:00
|
|
|
/* TODO: object output.
|
|
|
|
MCCodeEmitter *createHexagonMCCodeEmitter(const Target &,
|
|
|
|
TargetMachine &TM,
|
|
|
|
MCContext &Ctx);
|
|
|
|
*/
|
|
|
|
/* TODO: assembler input.
|
2012-05-12 07:10:30 +02:00
|
|
|
TargetAsmBackend *createHexagonAsmBackend(const Target &,
|
2012-05-03 23:52:53 +02:00
|
|
|
const std::string &);
|
2012-04-12 19:55:53 +02:00
|
|
|
*/
|
|
|
|
void HexagonLowerToMC(const MachineInstr *MI, MCInst &MCI,
|
|
|
|
HexagonAsmPrinter &AP);
|
2011-12-12 22:14:40 +01:00
|
|
|
} // end namespace llvm;
|
|
|
|
|
|
|
|
#define Hexagon_POINTER_SIZE 4
|
|
|
|
|
|
|
|
#define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
|
|
|
|
#define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
|
|
|
|
#define Hexagon_WordSize Hexagon_PointerSize
|
|
|
|
#define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
|
|
|
|
|
|
|
|
// allocframe saves LR and FP on stack before allocating
|
|
|
|
// a new stack frame. This takes 8 bytes.
|
|
|
|
#define HEXAGON_LRFP_SIZE 8
|
|
|
|
|
2012-04-12 19:55:53 +02:00
|
|
|
// Normal instruction size (in bytes).
|
|
|
|
#define HEXAGON_INSTR_SIZE 4
|
|
|
|
|
2012-05-03 23:52:53 +02:00
|
|
|
// Maximum number of words and instructions in a packet.
|
2012-04-12 19:55:53 +02:00
|
|
|
#define HEXAGON_PACKET_SIZE 4
|
|
|
|
|
2011-12-12 22:14:40 +01:00
|
|
|
#endif
|