2011-12-12 21:14:40 +00: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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
|
|
|
|
#define LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
|
2011-12-12 21:14:40 +00:00
|
|
|
|
2011-12-15 22:29:08 +00:00
|
|
|
#include "MCTargetDesc/HexagonMCTargetDesc.h"
|
2011-12-12 21:14:40 +00:00
|
|
|
#include "llvm/Target/TargetLowering.h"
|
2012-04-12 17:55:53 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2011-12-12 21:14:40 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class FunctionPass;
|
2012-04-12 17:55:53 +00:00
|
|
|
class HexagonAsmPrinter;
|
2011-12-12 21:14:40 +00:00
|
|
|
class HexagonTargetMachine;
|
2015-02-19 21:10:50 +00:00
|
|
|
class MachineInstr;
|
|
|
|
class MCInst;
|
|
|
|
class ModulePass;
|
2011-12-12 21:14:40 +00:00
|
|
|
class raw_ostream;
|
2015-02-19 21:10:50 +00:00
|
|
|
class TargetMachine;
|
2011-12-12 21:14:40 +00:00
|
|
|
|
2013-06-19 21:36:55 +00:00
|
|
|
FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM,
|
2013-02-13 21:38:46 +00:00
|
|
|
CodeGenOpt::Level OptLevel);
|
2013-05-06 18:38:37 +00:00
|
|
|
FunctionPass *createHexagonDelaySlotFillerPass(const TargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonFPMoverPass(const TargetMachine &TM);
|
|
|
|
FunctionPass *createHexagonRemoveExtendArgs(const HexagonTargetMachine &TM);
|
2015-02-02 18:46:27 +00:00
|
|
|
FunctionPass *createHexagonCFGOptimizer();
|
2012-05-14 19:35:42 +00:00
|
|
|
|
2015-02-02 22:11:43 +00:00
|
|
|
FunctionPass *createHexagonSplitConst32AndConst64();
|
2015-02-02 18:46:31 +00:00
|
|
|
FunctionPass *createHexagonExpandPredSpillCode();
|
2011-12-12 21:14:40 +00:00
|
|
|
FunctionPass *createHexagonHardwareLoops();
|
2012-02-15 18:52:27 +00:00
|
|
|
FunctionPass *createHexagonPeephole();
|
2011-12-12 21:14:40 +00:00
|
|
|
FunctionPass *createHexagonFixupHwLoops();
|
2013-05-14 18:54:06 +00:00
|
|
|
FunctionPass *createHexagonNewValueJump();
|
|
|
|
FunctionPass *createHexagonCopyToCombine();
|
2012-05-03 21:52:53 +00:00
|
|
|
FunctionPass *createHexagonPacketizer();
|
2012-05-12 05:10:30 +00:00
|
|
|
FunctionPass *createHexagonNewValueJump();
|
|
|
|
|
2012-04-12 17:55:53 +00:00
|
|
|
/* TODO: object output.
|
|
|
|
MCCodeEmitter *createHexagonMCCodeEmitter(const Target &,
|
2013-05-06 18:38:37 +00:00
|
|
|
const TargetMachine &TM,
|
2012-04-12 17:55:53 +00:00
|
|
|
MCContext &Ctx);
|
|
|
|
*/
|
|
|
|
/* TODO: assembler input.
|
2012-05-12 05:10:30 +00:00
|
|
|
TargetAsmBackend *createHexagonAsmBackend(const Target &,
|
2012-05-03 21:52:53 +00:00
|
|
|
const std::string &);
|
2012-04-12 17:55:53 +00:00
|
|
|
*/
|
2015-02-19 21:10:50 +00:00
|
|
|
void HexagonLowerToMC(MachineInstr const *MI, MCInst &MCI,
|
2012-04-12 17:55:53 +00:00
|
|
|
HexagonAsmPrinter &AP);
|
2011-12-12 21:14:40 +00: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 17:55:53 +00:00
|
|
|
// Normal instruction size (in bytes).
|
|
|
|
#define HEXAGON_INSTR_SIZE 4
|
|
|
|
|
2012-05-03 21:52:53 +00:00
|
|
|
// Maximum number of words and instructions in a packet.
|
2012-04-12 17:55:53 +00:00
|
|
|
#define HEXAGON_PACKET_SIZE 4
|
|
|
|
|
2015-05-29 14:44:13 +00:00
|
|
|
// Minimum number of instructions in an end-loop packet.
|
|
|
|
#define HEXAGON_PACKET_INNER_SIZE 2
|
|
|
|
#define HEXAGON_PACKET_OUTER_SIZE 3
|
2015-05-31 21:57:09 +00:00
|
|
|
// Maximum number of instructions in a packet before shuffling,
|
|
|
|
// including a compound one or a duplex or an extender.
|
|
|
|
#define HEXAGON_PRESHUFFLE_PACKET_SIZE (HEXAGON_PACKET_SIZE + 3)
|
2015-05-29 14:44:13 +00:00
|
|
|
|
2011-12-12 21:14:40 +00:00
|
|
|
#endif
|