LLVM  8.0.1
Macros | Functions | Variables
LanaiISelLowering.cpp File Reference
#include "LanaiISelLowering.h"
#include "Lanai.h"
#include "LanaiCondCode.h"
#include "LanaiMachineFunctionInfo.h"
#include "LanaiSubtarget.h"
#include "LanaiTargetObjectFile.h"
#include "MCTargetDesc/LanaiBaseInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetCallingConv.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MachineValueType.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <utility>
#include "LanaiGenCallingConv.inc"
Include dependency graph for LanaiISelLowering.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "lanai-lower"
 

Functions

static bool CC_Lanai32_VarArg (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
 
static LPCC::CondCode IntCondCCodeToICC (SDValue CC, const SDLoc &DL, SDValue &RHS, SelectionDAG &DAG)
 
static bool isZeroOrAllOnes (SDValue N, bool AllOnes)
 
static bool isConditionalZeroOrAllOnes (SDNode *N, bool AllOnes, SDValue &CC, bool &Invert, SDValue &OtherOp, SelectionDAG &DAG)
 
static SDValue combineSelectAndUse (SDNode *N, SDValue Slct, SDValue OtherOp, TargetLowering::DAGCombinerInfo &DCI, bool AllOnes)
 
static SDValue combineSelectAndUseCommutative (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, bool AllOnes)
 
static SDValue PerformSUBCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
 

Variables

static cl::opt< int > LanaiLowerConstantMulThreshold ("lanai-constant-mul-threshold", cl::Hidden, cl::desc("Maximum number of instruction to generate when lowering constant " "multiplication instead of calling library function [default=14]"), cl::init(14))
 
static unsigned NumFixedArgs
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lanai-lower"

Definition at line 56 of file LanaiISelLowering.cpp.

Function Documentation

◆ CC_Lanai32_VarArg()

static bool CC_Lanai32_VarArg ( unsigned  ValNo,
MVT  ValVT,
MVT  LocVT,
CCValAssign::LocInfo  LocInfo,
ISD::ArgFlagsTy  ArgFlags,
CCState State 
)
static

Definition at line 369 of file LanaiISelLowering.cpp.

References llvm::ISD::ADD, llvm::MachineRegisterInfo::addLiveIn(), llvm::CCState::addLoc(), llvm::CCValAssign::AExt, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::CCState::AllocateStack(), llvm::CCState::AnalyzeCallResult(), llvm::CCState::AnalyzeFormalArguments(), llvm::CCState::AnalyzeReturn(), llvm::ISD::ANY_EXTEND, Arg, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::CallingConv::C, llvm::LanaiISD::CALL, llvm::TargetLowering::CallLoweringInfo::CallConv, Callee, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::TargetLowering::CallLoweringInfo::Chain, llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetLowering::CallLoweringInfo::DAG, llvm::dbgs(), llvm::TargetLowering::CallLoweringInfo::DL, llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::errs(), llvm::CallingConv::Fast, first, llvm::CCValAssign::Full, G, llvm::ISD::ArgFlagsTy::getByValAlign(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::LanaiRegisterInfo::getCallPreservedMask(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::EVT::getEVTString(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::Function::getFunctionType(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::CCValAssign::getMem(), llvm::SelectionDAG::getMemcpy(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::FunctionType::getNumParams(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getRegisterMask(), llvm::EVT::getSimpleVT(), llvm::MVT::getSizeInBits(), llvm::LanaiMachineFunctionInfo::getSRetReturnReg(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SDValue::getValue(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::Function::hasStructRetAttr(), I, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i8, llvm::MipsISD::Ins, llvm::TargetLowering::CallLoweringInfo::Ins, llvm::ISD::ArgFlagsTy::isByVal(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::TargetLowering::CallLoweringInfo::IsTailCall, llvm::TargetLowering::CallLoweringInfo::IsVarArg, llvm::ISD::ArgFlagsTy::isZExt(), LLVM_DEBUG, llvm_unreachable, llvm::BitmaskEnumDetail::Mask(), llvm::LanaiII::MO_NO_FLAG, llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::Outs, llvm::TargetLowering::CallLoweringInfo::OutVals, llvm::SmallVectorTemplateBase< T >::push_back(), Reg, llvm::report_fatal_error(), llvm::LanaiISD::RET_FLAG, second, llvm::LanaiMachineFunctionInfo::setSRetReturnReg(), llvm::LanaiMachineFunctionInfo::setVarArgsFrameIndex(), llvm::CCValAssign::SExt, llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, Size, llvm::SmallVectorBase::size(), llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.

◆ combineSelectAndUse()

static SDValue combineSelectAndUse ( SDNode N,
SDValue  Slct,
SDValue  OtherOp,
TargetLowering::DAGCombinerInfo DCI,
bool  AllOnes 
)
static

◆ combineSelectAndUseCommutative()

static SDValue combineSelectAndUseCommutative ( SDNode N,
TargetLowering::DAGCombinerInfo DCI,
bool  AllOnes 
)
static

◆ IntCondCCodeToICC()

static LPCC::CondCode IntCondCCodeToICC ( SDValue  CC,
const SDLoc DL,
SDValue RHS,
SelectionDAG DAG 
)
static

◆ isConditionalZeroOrAllOnes()

static bool isConditionalZeroOrAllOnes ( SDNode N,
bool  AllOnes,
SDValue CC,
bool Invert,
SDValue OtherOp,
SelectionDAG DAG 
)
static

◆ isZeroOrAllOnes()

static bool isZeroOrAllOnes ( SDValue  N,
bool  AllOnes 
)
inlinestatic

◆ PerformSUBCombine()

static SDValue PerformSUBCombine ( SDNode N,
TargetLowering::DAGCombinerInfo DCI 
)
static

Variable Documentation

◆ LanaiLowerConstantMulThreshold

cl::opt<int> LanaiLowerConstantMulThreshold("lanai-constant-mul-threshold", cl::Hidden, cl::desc("Maximum number of instruction to generate when lowering constant " "multiplication instead of calling library function [default=14]"), cl::init(14))
static

◆ NumFixedArgs

unsigned NumFixedArgs
static

Definition at line 368 of file LanaiISelLowering.cpp.

Referenced by CallingConvSupported(), and llvm::CallLowering::lowerCall().