LLVM  3.7.0
Macros | Enumerations | Functions | Variables
HexagonFrameLowering.cpp File Reference
#include "HexagonFrameLowering.h"
#include "Hexagon.h"
#include "HexagonInstrInfo.h"
#include "HexagonMachineFunctionInfo.h"
#include "HexagonRegisterInfo.h"
#include "HexagonSubtarget.h"
#include "HexagonTargetMachine.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachinePostDominators.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
Include dependency graph for HexagonFrameLowering.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "hexagon-pei"
 

Enumerations

enum  SpillKind { SK_ToMem, SK_FromMem, SK_FromMemTailcall }
 

Functions

static const char * getSpillFunctionFor (unsigned MaxReg, SpillKind SpillType)
 
static void addCalleeSaveRegistersAsImpOperand (MachineInstr *Inst, unsigned MaxReg, bool IsDef)
 Adds all callee-saved registers up to MaxReg to the instruction. More...
 
static bool needToReserveScavengingSpillSlots (MachineFunction &MF, const HexagonRegisterInfo &HRI)
 Returns true if there is no caller saved registers available. More...
 
static void dump_registers (BitVector &Regs, const TargetRegisterInfo &TRI)
 
static bool isOptSize (const MachineFunction &MF)
 
static bool isMinSize (const MachineFunction &MF)
 

Variables

static cl::opt< boolDisableDeallocRet ("disable-hexagon-dealloc-ret", cl::Hidden, cl::desc("Disable Dealloc Return for Hexagon target"))
 
static cl::opt< intNumberScavengerSlots ("number-scavenger-slots", cl::Hidden, cl::desc("Set the number of scavenger slots"), cl::init(2), cl::ZeroOrMore)
 
static cl::opt< intSpillFuncThreshold ("spill-func-threshold", cl::Hidden, cl::desc("Specify O2(not Os) spill func threshold"), cl::init(6), cl::ZeroOrMore)
 
static cl::opt< intSpillFuncThresholdOs ("spill-func-threshold-Os", cl::Hidden, cl::desc("Specify Os spill func threshold"), cl::init(1), cl::ZeroOrMore)
 
static cl::opt< boolEnableShrinkWrapping ("hexagon-shrink-frame", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable stack frame shrink wrapping"))
 
static cl::opt< unsignedShrinkLimit ("shrink-frame-limit", cl::init(UINT_MAX), cl::Hidden, cl::ZeroOrMore, cl::desc("Max count of stack frame ""shrink-wraps"))
 

Macro Definition Documentation

#define DEBUG_TYPE   "hexagon-pei"

Definition at line 11 of file HexagonFrameLowering.cpp.

Enumeration Type Documentation

enum SpillKind
Enumerator
SK_ToMem 
SK_FromMem 
SK_FromMemTailcall 

Definition at line 642 of file HexagonFrameLowering.cpp.

Function Documentation

static void addCalleeSaveRegistersAsImpOperand ( MachineInstr Inst,
unsigned  MaxReg,
bool  IsDef 
)
static

Adds all callee-saved registers up to MaxReg to the instruction.

Definition at line 711 of file HexagonFrameLowering.cpp.

References llvm::MachineInstr::addOperand(), and llvm::MachineOperand::CreateReg().

static void dump_registers ( BitVector Regs,
const TargetRegisterInfo TRI 
)
static
static const char* getSpillFunctionFor ( unsigned  MaxReg,
SpillKind  SpillType 
)
static

Definition at line 649 of file HexagonFrameLowering.cpp.

References llvm_unreachable, SK_FromMem, SK_FromMemTailcall, and SK_ToMem.

static bool isMinSize ( const MachineFunction MF)
inlinestatic
static bool isOptSize ( const MachineFunction MF)
inlinestatic
static bool needToReserveScavengingSpillSlots ( MachineFunction MF,
const HexagonRegisterInfo HRI 
)
static

Variable Documentation

cl::opt<bool> DisableDeallocRet("disable-hexagon-dealloc-ret", cl::Hidden, cl::desc("Disable Dealloc Return for Hexagon target"))
static
cl::opt<bool> EnableShrinkWrapping("hexagon-shrink-frame", cl::init(true), cl::Hidden, cl::ZeroOrMore, cl::desc("Enable stack frame shrink wrapping"))
static
cl::opt<int> NumberScavengerSlots("number-scavenger-slots", cl::Hidden, cl::desc("Set the number of scavenger slots"), cl::init(2), cl::ZeroOrMore)
static
cl::opt<unsigned> ShrinkLimit("shrink-frame-limit", cl::init(UINT_MAX), cl::Hidden, cl::ZeroOrMore, cl::desc("Max count of stack frame ""shrink-wraps"))
static
cl::opt<int> SpillFuncThreshold("spill-func-threshold", cl::Hidden, cl::desc("Specify O2(not Os) spill func threshold"), cl::init(6), cl::ZeroOrMore)
static
cl::opt<int> SpillFuncThresholdOs("spill-func-threshold-Os", cl::Hidden, cl::desc("Specify Os spill func threshold"), cl::init(1), cl::ZeroOrMore)
static