LLVM API Documentation

Defines | Enumerations | Functions | Variables
MSP430ISelLowering.cpp File Reference
#include "MSP430ISelLowering.h"
#include "MSP430.h"
#include "MSP430MachineFunctionInfo.h"
#include "MSP430Subtarget.h"
#include "MSP430TargetMachine.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "MSP430GenCallingConv.inc"
Include dependency graph for MSP430ISelLowering.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "msp430-lower"

Enumerations

enum  HWMultUseMode { NoHWMult, HWMultIntr, HWMultNoIntr }

Functions

template<typename ArgT >
static void ParseFunctionArgs (const SmallVectorImpl< ArgT > &Args, SmallVectorImpl< unsigned > &Out)
static void AnalyzeVarArgs (CCState &State, const SmallVectorImpl< ISD::OutputArg > &Outs)
static void AnalyzeVarArgs (CCState &State, const SmallVectorImpl< ISD::InputArg > &Ins)
template<typename ArgT >
static void AnalyzeArguments (CCState &State, SmallVectorImpl< CCValAssign > &ArgLocs, const SmallVectorImpl< ArgT > &Args)
static void AnalyzeRetResult (CCState &State, const SmallVectorImpl< ISD::InputArg > &Ins)
static void AnalyzeRetResult (CCState &State, const SmallVectorImpl< ISD::OutputArg > &Outs)
template<typename ArgT >
static void AnalyzeReturnValues (CCState &State, SmallVectorImpl< CCValAssign > &RVLocs, const SmallVectorImpl< ArgT > &Args)
static SDValue EmitCMP (SDValue &LHS, SDValue &RHS, SDValue &TargetCC, ISD::CondCode CC, SDLoc dl, SelectionDAG &DAG)

Variables

static cl::opt< HWMultUseModeHWMultMode ("msp430-hwmult-mode", cl::Hidden, cl::desc("Hardware multiplier use mode"), cl::init(HWMultNoIntr), cl::values(clEnumValN(NoHWMult,"no","Do not use hardware multiplier"), clEnumValN(HWMultIntr,"interrupts","Assume hardware multiplier can be used inside interrupts"), clEnumValN(HWMultNoIntr,"use","Assume hardware multiplier cannot be used inside interrupts"), clEnumValEnd))

Define Documentation

#define DEBUG_TYPE   "msp430-lower"

Definition at line 39 of file MSP430ISelLowering.cpp.


Enumeration Type Documentation

Enumerator:
NoHWMult 
HWMultIntr 
HWMultNoIntr 

Definition at line 41 of file MSP430ISelLowering.cpp.


Function Documentation

template<typename ArgT >
static void AnalyzeArguments ( CCState State,
SmallVectorImpl< CCValAssign > &  ArgLocs,
const SmallVectorImpl< ArgT > &  Args 
) [static]

Analyze incoming and outgoing function arguments. We need custom C++ code to handle special constraints in the ABI like reversing the order of the pieces of splitted arguments. In addition, all pieces of a certain argument have to be passed either using registers or the stack but never mixing both.

Definition at line 281 of file MSP430ISelLowering.cpp.

References llvm::CCState::addLoc(), llvm::CCValAssign::AExt, llvm::CCState::AllocateReg(), AnalyzeVarArgs(), llvm::array_lengthof(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CCValAssign::Full, llvm::CCValAssign::getReg(), llvm::CCState::HandleByVal(), llvm::MVT::i16, llvm::MVT::i8, llvm::ISD::ArgFlagsTy::isByVal(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::CCState::isVarArg(), llvm::ISD::ArgFlagsTy::isZExt(), ParseFunctionArgs(), llvm::CCValAssign::SExt, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::CCValAssign::ZExt.

static void AnalyzeRetResult ( CCState State,
const SmallVectorImpl< ISD::InputArg > &  Ins 
) [static]

Definition at line 346 of file MSP430ISelLowering.cpp.

References llvm::CCState::AnalyzeCallResult().

Referenced by AnalyzeReturnValues().

static void AnalyzeRetResult ( CCState State,
const SmallVectorImpl< ISD::OutputArg > &  Outs 
) [static]

Definition at line 351 of file MSP430ISelLowering.cpp.

References llvm::CCState::AnalyzeReturn().

template<typename ArgT >
static void AnalyzeReturnValues ( CCState State,
SmallVectorImpl< CCValAssign > &  RVLocs,
const SmallVectorImpl< ArgT > &  Args 
) [static]
static void AnalyzeVarArgs ( CCState State,
const SmallVectorImpl< ISD::OutputArg > &  Outs 
) [static]

Definition at line 266 of file MSP430ISelLowering.cpp.

References llvm::CCState::AnalyzeCallOperands().

Referenced by AnalyzeArguments().

static void AnalyzeVarArgs ( CCState State,
const SmallVectorImpl< ISD::InputArg > &  Ins 
) [static]

Definition at line 271 of file MSP430ISelLowering.cpp.

References llvm::CCState::AnalyzeFormalArguments().

static SDValue EmitCMP ( SDValue LHS,
SDValue RHS,
SDValue TargetCC,
ISD::CondCode  CC,
SDLoc  dl,
SelectionDAG DAG 
) [static]
template<typename ArgT >
static void ParseFunctionArgs ( const SmallVectorImpl< ArgT > &  Args,
SmallVectorImpl< unsigned > &  Out 
) [static]

For each argument in a function store the number of pieces it is composed of.

Definition at line 253 of file MSP430ISelLowering.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T >::size().

Referenced by AnalyzeArguments().


Variable Documentation

cl::opt<HWMultUseMode> HWMultMode("msp430-hwmult-mode", cl::Hidden, cl::desc("Hardware multiplier use mode"), cl::init(HWMultNoIntr), cl::values(clEnumValN(NoHWMult,"no","Do not use hardware multiplier"),clEnumValN(HWMultIntr,"interrupts","Assume hardware multiplier can be used inside interrupts"),clEnumValN(HWMultNoIntr,"use","Assume hardware multiplier cannot be used inside interrupts"),clEnumValEnd)) [static]