LLVM  12.0.0git
Macros | Functions | Variables
PPCISelLowering.cpp File Reference
#include "PPCISelLowering.h"
#include "MCTargetDesc/PPCPredicates.h"
#include "PPC.h"
#include "PPCCCState.h"
#include "PPCCallingConv.h"
#include "PPCFrameLowering.h"
#include "PPCInstrInfo.h"
#include "PPCMachineFunctionInfo.h"
#include "PPCPerfectShuffle.h"
#include "PPCRegisterInfo.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsPowerPC.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSymbolXCOFF.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.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 "llvm/Target/TargetOptions.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <list>
#include <utility>
#include <vector>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "ppc-lowering"
 

Functions

 STATISTIC (NumTailCalls, "Number of tail calls")
 
 STATISTIC (NumSiblingCalls, "Number of sibling calls")
 
 STATISTIC (ShufflesHandledWithVPERM, "Number of shuffles lowered to a VPERM")
 
 STATISTIC (NumDynamicAllocaProbed, "Number of dynamic stack allocation probed")
 
static bool isNByteElemShuffleMask (ShuffleVectorSDNode *N, unsigned Width, int StepLen)
 Check that the mask is shuffling N byte elements. More...
 
static SDValue widenVec (SelectionDAG &DAG, SDValue Vec, const SDLoc &dl)
 
static void getMaxByValAlign (Type *Ty, Align &MaxAlign, Align MaxMaxAlign)
 getMaxByValAlign - Helper for getByValTypeAlignment to determine the desired ByVal argument alignment. More...
 
static bool isFloatingPointZero (SDValue Op)
 isFloatingPointZero - Return true if this is 0.0 or -0.0. More...
 
static bool isConstantOrUndef (int Op, int Val)
 isConstantOrUndef - Op is either an undef node or a ConstantSDNode. More...
 
static bool isVMerge (ShuffleVectorSDNode *N, unsigned UnitSize, unsigned LHSStart, unsigned RHSStart)
 isVMerge - Common function, used to match vmrg* shuffles. More...
 
static bool isVMerge (ShuffleVectorSDNode *N, unsigned IndexOffset, unsigned RHSStartValue)
 Common function used to match vmrgew and vmrgow shuffles. More...
 
static bool isXXBRShuffleMaskHelper (ShuffleVectorSDNode *N, int Width)
 
static void fixupFuncForFI (SelectionDAG &DAG, int FrameIdx, EVT VT)
 
template<typename Ty >
static bool isValidPCRelNode (SDValue N)
 
static bool usePartialVectorLoads (SDNode *N, const PPCSubtarget &ST)
 Returns true if we should use a direct load into vector instruction (such as lxsd or lfd), instead of a load into gpr + direct move sequence. More...
 
static void getLabelAccessInfo (bool IsPIC, const PPCSubtarget &Subtarget, unsigned &HiOpFlags, unsigned &LoOpFlags, const GlobalValue *GV=nullptr)
 Return true if we should reference labels using a PICBase, set the HiOpFlags and LoOpFlags to the target MO flags. More...
 
static SDValue LowerLabelRef (SDValue HiPart, SDValue LoPart, bool isPIC, SelectionDAG &DAG)
 
static void setUsesTOCBasePtr (MachineFunction &MF)
 
static void setUsesTOCBasePtr (SelectionDAG &DAG)
 
static unsigned CalculateStackSlotSize (EVT ArgVT, ISD::ArgFlagsTy Flags, unsigned PtrByteSize)
 CalculateStackSlotSize - Calculates the size reserved for this argument on the stack. More...
 
static Align CalculateStackSlotAlignment (EVT ArgVT, EVT OrigVT, ISD::ArgFlagsTy Flags, unsigned PtrByteSize)
 CalculateStackSlotAlignment - Calculates the alignment of this argument on the stack. More...
 
static bool CalculateStackSlotUsed (EVT ArgVT, EVT OrigVT, ISD::ArgFlagsTy Flags, unsigned PtrByteSize, unsigned LinkageSize, unsigned ParamAreaSize, unsigned &ArgOffset, unsigned &AvailableFPRs, unsigned &AvailableVRs, bool HasQPX)
 CalculateStackSlotUsed - Return whether this argument will use its stack slot (instead of being passed in registers). More...
 
static unsigned EnsureStackAlignment (const PPCFrameLowering *Lowering, unsigned NumBytes)
 EnsureStackAlignment - Round stack frame size up from NumBytes to ensure minimum alignment required for target. More...
 
static int CalculateTailCallSPDiff (SelectionDAG &DAG, bool isTailCall, unsigned ParamSize)
 CalculateTailCallSPDiff - Get the amount the stack pointer has to be adjusted to accommodate the arguments for the tailcall. More...
 
static bool isFunctionGlobalAddress (SDValue Callee)
 
static bool callsShareTOCBase (const Function *Caller, SDValue Callee, const TargetMachine &TM)
 
static bool needStackSlotPassParameters (const PPCSubtarget &Subtarget, const SmallVectorImpl< ISD::OutputArg > &Outs)
 
static bool hasSameArgumentList (const Function *CallerFn, const CallBase &CB)
 
static bool areCallingConvEligibleForTCO_64SVR4 (CallingConv::ID CallerCC, CallingConv::ID CalleeCC)
 
static SDNodeisBLACompatibleAddress (SDValue Op, SelectionDAG &DAG)
 isCallCompatibleAddress - Return the immediate to use if the specified 32-bit value is representable in the immediate field of a BxA instruction. More...
 
static void StoreTailCallArgumentsToStackSlot (SelectionDAG &DAG, SDValue Chain, const SmallVectorImpl< TailCallArgumentInfo > &TailCallArgs, SmallVectorImpl< SDValue > &MemOpChains, const SDLoc &dl)
 StoreTailCallArgumentsToStackSlot - Stores arguments to their stack slot. More...
 
static SDValue EmitTailCallStoreFPAndRetAddr (SelectionDAG &DAG, SDValue Chain, SDValue OldRetAddr, SDValue OldFP, int SPDiff, const SDLoc &dl)
 EmitTailCallStoreFPAndRetAddr - Move the frame pointer and return address to the appropriate stack slot for the tail call optimized function call. More...
 
static void CalculateTailCallArgDest (SelectionDAG &DAG, MachineFunction &MF, bool isPPC64, SDValue Arg, int SPDiff, unsigned ArgOffset, SmallVectorImpl< TailCallArgumentInfo > &TailCallArguments)
 CalculateTailCallArgDest - Remember Argument for later processing. More...
 
static SDValue CreateCopyOfByValArgument (SDValue Src, SDValue Dst, SDValue Chain, ISD::ArgFlagsTy Flags, SelectionDAG &DAG, const SDLoc &dl)
 CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst" of size "Size". More...
 
static void LowerMemOpCallTo (SelectionDAG &DAG, MachineFunction &MF, SDValue Chain, SDValue Arg, SDValue PtrOff, int SPDiff, unsigned ArgOffset, bool isPPC64, bool isTailCall, bool isVector, SmallVectorImpl< SDValue > &MemOpChains, SmallVectorImpl< TailCallArgumentInfo > &TailCallArguments, const SDLoc &dl)
 LowerMemOpCallTo - Store the argument to the stack or remember it in case of tail calls. More...
 
static void PrepareTailCall (SelectionDAG &DAG, SDValue &InFlag, SDValue &Chain, const SDLoc &dl, int SPDiff, unsigned NumBytes, SDValue LROp, SDValue FPOp, SmallVectorImpl< TailCallArgumentInfo > &TailCallArguments)
 
static bool isIndirectCall (const SDValue &Callee, SelectionDAG &DAG, const PPCSubtarget &Subtarget, bool isPatchPoint)
 
static bool isTOCSaveRestoreRequired (const PPCSubtarget &Subtarget)
 
static unsigned getCallOpcode (PPCTargetLowering::CallFlags CFlags, const Function &Caller, const SDValue &Callee, const PPCSubtarget &Subtarget, const TargetMachine &TM)
 
static SDValue transformCallee (const SDValue &Callee, SelectionDAG &DAG, const SDLoc &dl, const PPCSubtarget &Subtarget)
 
static SDValue getOutputChainFromCallSeq (SDValue CallSeqStart)
 
static void prepareIndirectCall (SelectionDAG &DAG, SDValue &Callee, SDValue &Glue, SDValue &Chain, const SDLoc &dl)
 
static void prepareDescriptorIndirectCall (SelectionDAG &DAG, SDValue &Callee, SDValue &Glue, SDValue &Chain, SDValue CallSeqStart, const CallBase *CB, const SDLoc &dl, bool hasNest, const PPCSubtarget &Subtarget)
 
static void buildCallOperands (SmallVectorImpl< SDValue > &Ops, PPCTargetLowering::CallFlags CFlags, const SDLoc &dl, SelectionDAG &DAG, SmallVector< std::pair< unsigned, SDValue >, 8 > &RegsToPass, SDValue Glue, SDValue Chain, SDValue &Callee, int SPDiff, const PPCSubtarget &Subtarget)
 
static bool CC_AIX (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
 
static const TargetRegisterClassgetRegClassForSVT (MVT::SimpleValueType SVT, bool IsPPC64)
 
static SDValue truncateScalarIntegerArg (ISD::ArgFlagsTy Flags, EVT ValVT, SelectionDAG &DAG, SDValue ArgValue, MVT LocVT, const SDLoc &dl)
 
static unsigned mapArgRegToOffsetAIX (unsigned Reg, const PPCFrameLowering *FL)
 
static SDValue getCanonicalConstSplat (uint64_t Val, unsigned SplatSize, EVT VT, SelectionDAG &DAG, const SDLoc &dl)
 getCanonicalConstSplat - Build a canonical splat immediate of Val with an element size of SplatSize. More...
 
static SDValue BuildIntrinsicOp (unsigned IID, SDValue Op, SelectionDAG &DAG, const SDLoc &dl, EVT DestVT=MVT::Other)
 BuildIntrinsicOp - Return a unary operator intrinsic node with the specified intrinsic ID. More...
 
static SDValue BuildIntrinsicOp (unsigned IID, SDValue LHS, SDValue RHS, SelectionDAG &DAG, const SDLoc &dl, EVT DestVT=MVT::Other)
 BuildIntrinsicOp - Return a binary operator intrinsic node with the specified intrinsic ID. More...
 
static SDValue BuildIntrinsicOp (unsigned IID, SDValue Op0, SDValue Op1, SDValue Op2, SelectionDAG &DAG, const SDLoc &dl, EVT DestVT=MVT::Other)
 BuildIntrinsicOp - Return a ternary operator intrinsic node with the specified intrinsic ID. More...
 
static SDValue BuildVSLDOI (SDValue LHS, SDValue RHS, unsigned Amt, EVT VT, SelectionDAG &DAG, const SDLoc &dl)
 BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified amount. More...
 
static bool haveEfficientBuildVectorPattern (BuildVectorSDNode *V, bool HasDirectMove, bool HasP8Vector)
 Do we have an efficient pattern in a .td file for this node? More...
 
static const SDValuegetNormalLoadInput (const SDValue &Op)
 
static SDValue GeneratePerfectShuffle (unsigned PFEntry, SDValue LHS, SDValue RHS, SelectionDAG &DAG, const SDLoc &dl)
 GeneratePerfectShuffle - Given an entry in the perfect-shuffle table, emit the specified operations to build the shuffle. More...
 
static bool getVectorCompareInfo (SDValue Intrin, int &CompareOpc, bool &isDot, const PPCSubtarget &Subtarget)
 getVectorCompareInfo - Given an intrinsic, return false if it is not a vector comparison. More...
 
static InstructioncallIntrinsic (IRBuilder<> &Builder, Intrinsic::ID Id)
 
static int getEstimateRefinementSteps (EVT VT, const PPCSubtarget &Subtarget)
 
static void getBaseWithConstantOffset (SDValue Loc, SDValue &Base, int64_t &Offset, SelectionDAG &DAG)
 
static bool isConsecutiveLSLoc (SDValue Loc, EVT VT, LSBaseSDNode *Base, unsigned Bytes, int Dist, SelectionDAG &DAG)
 
static bool isConsecutiveLS (SDNode *N, LSBaseSDNode *Base, unsigned Bytes, int Dist, SelectionDAG &DAG)
 
static bool findConsecutiveLoad (LoadSDNode *LD, SelectionDAG &DAG)
 
static SDValue generateEquivalentSub (SDNode *N, int Size, bool Complement, bool Swap, SDLoc &DL, SelectionDAG &DAG)
 This function is called when we have proved that a SETCC node can be replaced by subtraction (and other supporting instructions) so that the result of comparison is kept in a GPR instead of CR. More...
 
static bool isFPExtLoad (SDValue Op)
 
static SDValue combineBVOfConsecutiveLoads (SDNode *N, SelectionDAG &DAG)
 Reduce the number of loads when building a vector. More...
 
static SDValue addShuffleForVecExtend (SDNode *N, SelectionDAG &DAG, SDValue Input, uint64_t Elems, uint64_t CorrectElems)
 
static SDValue combineBVOfVecSExt (SDNode *N, SelectionDAG &DAG)
 
static bool isAlternatingShuffMask (const ArrayRef< int > &Mask, int NumElts)
 
static bool isSplatBV (SDValue Op)
 
static SDValue isScalarToVec (SDValue Op)
 
static void fixupShuffleMaskForPermutedSToV (SmallVectorImpl< int > &ShuffV, int LHSMaxIdx, int RHSMinIdx, int RHSMaxIdx, int HalfVec)
 
static SDValue getSToVPermuted (SDValue OrigSToV, SelectionDAG &DAG)
 
static unsigned invertFMAOpcode (unsigned Opc)
 
static SDValue stripModuloOnShift (const TargetLowering &TLI, SDNode *N, SelectionDAG &DAG)
 
static SDValue combineADDToADDZE (SDNode *N, SelectionDAG &DAG, const PPCSubtarget &Subtarget)
 
static SDValue combineADDToMAT_PCREL_ADDR (SDNode *N, SelectionDAG &DAG, const PPCSubtarget &Subtarget)
 

Variables

static cl::opt< boolDisablePPCPreinc ("disable-ppc-preinc", cl::desc("disable preincrement load/store generation on PPC"), cl::Hidden)
 
static cl::opt< boolDisableILPPref ("disable-ppc-ilp-pref", cl::desc("disable setting the node scheduling preference to ILP on PPC"), cl::Hidden)
 
static cl::opt< boolDisablePPCUnaligned ("disable-ppc-unaligned", cl::desc("disable unaligned load/store generation on PPC"), cl::Hidden)
 
static cl::opt< boolDisableSCO ("disable-ppc-sco", cl::desc("disable sibling call optimization on ppc"), cl::Hidden)
 
static cl::opt< boolDisableInnermostLoopAlign32 ("disable-ppc-innermost-loop-align32", cl::desc("don't always align innermost loop to 32 bytes on ppc"), cl::Hidden)
 
static cl::opt< boolUseAbsoluteJumpTables ("ppc-use-absolute-jumptables", cl::desc("use absolute jump tables on ppc"), cl::Hidden)
 
cl::opt< boolANDIGlueBug
 
static const MCPhysReg FPR []
 FPR - The set of FP registers that should be allocated for arguments on Darwin and AIX. More...
 
static const MCPhysReg QFPR []
 QFPR - The set of QPX registers that should be allocated for arguments. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ppc-lowering"

Definition at line 103 of file PPCISelLowering.cpp.

Function Documentation

◆ addShuffleForVecExtend()

static SDValue addShuffleForVecExtend ( SDNode N,
SelectionDAG DAG,
SDValue  Input,
uint64_t  Elems,
uint64_t  CorrectElems 
)
static

◆ areCallingConvEligibleForTCO_64SVR4()

static bool areCallingConvEligibleForTCO_64SVR4 ( CallingConv::ID  CallerCC,
CallingConv::ID  CalleeCC 
)
static

◆ buildCallOperands()

static void buildCallOperands ( SmallVectorImpl< SDValue > &  Ops,
PPCTargetLowering::CallFlags  CFlags,
const SDLoc dl,
SelectionDAG DAG,
SmallVector< std::pair< unsigned, SDValue >, 8 > &  RegsToPass,
SDValue  Glue,
SDValue  Chain,
SDValue Callee,
int  SPDiff,
const PPCSubtarget Subtarget 
)
static

Definition at line 5522 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::SelectionDAG::addNoMergeSiteInfo(), llvm::alignTo(), llvm::CCState::AllocateStack(), llvm::ISD::ANY_EXTEND, llvm::any_of(), Arg, llvm::array_lengthof(), assert(), llvm::ISD::BITCAST, llvm::ISD::BUILD_PAIR, llvm::CallingConv::C, CalculateStackSlotAlignment(), CalculateStackSlotSize(), CalculateStackSlotUsed(), CalculateTailCallArgDest(), CalculateTailCallSPDiff(), llvm::PPCTargetLowering::CallFlags::CallConv, llvm::TargetLowering::CallLoweringInfo::CallConv, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::TargetLowering::CallLoweringInfo::CB, llvm::CC_PPC32_SVR4(), llvm::CC_PPC32_SVR4_ByVal(), llvm::CC_PPC32_SVR4_VarArg(), llvm::TargetLowering::CallLoweringInfo::Chain, llvm::CallingConv::Cold, llvm::PPCISD::CR6SET, llvm::PPCISD::CR6UNSET, CreateCopyOfByValArgument(), llvm::TargetLowering::CallLoweringInfo::DAG, llvm::dbgs(), llvm::TargetLowering::CallLoweringInfo::DL, llvm::SDValue::dump(), llvm::numbers::e, llvm::SmallVectorBase< SmallVectorSizeType< T > >::empty(), EnsureStackAlignment(), llvm::errs(), llvm::ISD::EXTLOAD, llvm::PPCISD::EXTRACT_SPE, llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::CallingConv::Fast, llvm::ISD::OutputArg::Flags, llvm::CCValAssign::Full, llvm::ISD::ArgFlagsTy::getByValSize(), getCallOpcode(), llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::SDValue::getConstantOperandVal(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::PPCSubtarget::getEnvironmentPointerRegister(), llvm::EVT::getEVTString(), llvm::SelectionDAG::getExtLoad(), llvm::MachineFunction::getFrameInfo(), llvm::PPCSubtarget::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getName(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::TargetLoweringBase::getPointerTy(), getReg(), llvm::SelectionDAG::getRegister(), llvm::PPCSubtarget::getRegisterInfo(), llvm::SelectionDAG::getRegisterMask(), llvm::SDValue::getSimpleValueType(), llvm::EVT::getSimpleVT(), llvm::MachinePointerInfo::getStack(), llvm::SelectionDAG::getStackArgumentTokenFactor(), llvm::PPCSubtarget::getStackPointerRegister(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTarget(), llvm::TargetLoweringBase::getTargetMachine(), llvm::PPCSubtarget::getTOCPointerRegister(), llvm::PPCFrameLowering::getTOCSaveOffset(), llvm::CCValAssign::getValNo(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::GPR, llvm::TargetOptions::GuaranteedTailCallOpt, llvm::PPCTargetLowering::CallFlags::HasNest, llvm::MipsISD::Hi, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::TargetLowering::CallLoweringInfo::Ins, llvm::PPCSubtarget::is32BitELFABI(), llvm::PPCSubtarget::is64BitELFABI(), llvm::PPCSubtarget::isAIXABI(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isInConsecutiveRegs(), llvm::ISD::ArgFlagsTy::isInConsecutiveRegsLast(), llvm::PPCTargetLowering::CallFlags::IsIndirect, isIndirectCall(), llvm::CCValAssign::isMemLoc(), llvm::CallBase::isMustTailCall(), llvm::ISD::ArgFlagsTy::isNest(), llvm::PPCTargetLowering::CallFlags::IsPatchPoint, llvm::TargetLowering::CallLoweringInfo::IsPatchPoint, llvm::PPCSubtarget::isPPC64(), llvm::CCValAssign::isRegLoc(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::PPCTargetLowering::CallFlags::IsTailCall, llvm::TargetLowering::CallLoweringInfo::IsTailCall, isTOCSaveRestoreRequired(), llvm::PPCSubtarget::isUsingPCRelativeCalls(), llvm::PPCTargetLowering::CallFlags::IsVarArg, llvm::TargetLowering::CallLoweringInfo::IsVarArg, LLVM_DEBUG, LLVM_FALLTHROUGH, llvm_unreachable, llvm::MipsISD::Lo, llvm::SPII::Load, LowerMemOpCallTo(), llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), llvm::max(), llvm::min(), llvm::TargetLowering::CallLoweringInfo::NoMerge, llvm::TargetMachine::Options, llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::Outs, llvm::TargetLowering::CallLoweringInfo::OutVals, prepareDescriptorIndirectCall(), prepareIndirectCall(), PrepareTailCall(), llvm::SmallVectorTemplateBase< T >::push_back(), R4, R6, llvm::ISD::Register, llvm::report_fatal_error(), llvm::MachineFrameInfo::setHasTailCall(), setUsesTOCBasePtr(), llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, Size, llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::SPII::Store, std::swap(), llvm::ISD::TargetExternalSymbol, llvm::ISD::TargetGlobalAddress, llvm::PPCISD::TC_RETURN, llvm::ISD::TokenFactor, transformCallee(), TRI, llvm::PPCSubtarget::usesFunctionDescriptors(), llvm::PPCTargetLowering::useSoftFloat(), llvm::MVT::v16i8, llvm::MVT::v1i128, llvm::NVPTX::PTXLdStInstCode::V2, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::NVPTX::PTXLdStInstCode::V4, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::ISD::ZERO_EXTEND.

◆ BuildIntrinsicOp() [1/3]

static SDValue BuildIntrinsicOp ( unsigned  IID,
SDValue  Op,
SelectionDAG DAG,
const SDLoc dl,
EVT  DestVT = MVT::Other 
)
static

◆ BuildIntrinsicOp() [2/3]

static SDValue BuildIntrinsicOp ( unsigned  IID,
SDValue  LHS,
SDValue  RHS,
SelectionDAG DAG,
const SDLoc dl,
EVT  DestVT = MVT::Other 
)
static

BuildIntrinsicOp - Return a binary operator intrinsic node with the specified intrinsic ID.

Definition at line 9012 of file PPCISelLowering.cpp.

References llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::MVT::i32, llvm::ISD::INTRINSIC_WO_CHAIN, and llvm::MVT::Other.

◆ BuildIntrinsicOp() [3/3]

static SDValue BuildIntrinsicOp ( unsigned  IID,
SDValue  Op0,
SDValue  Op1,
SDValue  Op2,
SelectionDAG DAG,
const SDLoc dl,
EVT  DestVT = MVT::Other 
)
static

BuildIntrinsicOp - Return a ternary operator intrinsic node with the specified intrinsic ID.

Definition at line 9022 of file PPCISelLowering.cpp.

References llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::MVT::i32, llvm::ISD::INTRINSIC_WO_CHAIN, and llvm::MVT::Other.

◆ BuildVSLDOI()

static SDValue BuildVSLDOI ( SDValue  LHS,
SDValue  RHS,
unsigned  Amt,
EVT  VT,
SelectionDAG DAG,
const SDLoc dl 
)
static

BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified amount.

The result has the specified value type.

Definition at line 9032 of file PPCISelLowering.cpp.

References llvm::ISD::BITCAST, llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getVectorShuffle(), and llvm::MVT::v16i8.

Referenced by llvm::convertToNonDenormSingle(), and GeneratePerfectShuffle().

◆ CalculateStackSlotAlignment()

static Align CalculateStackSlotAlignment ( EVT  ArgVT,
EVT  OrigVT,
ISD::ArgFlagsTy  Flags,
unsigned  PtrByteSize 
)
static

◆ CalculateStackSlotSize()

static unsigned CalculateStackSlotSize ( EVT  ArgVT,
ISD::ArgFlagsTy  Flags,
unsigned  PtrByteSize 
)
static

CalculateStackSlotSize - Calculates the size reserved for this argument on the stack.

Definition at line 3502 of file PPCISelLowering.cpp.

References llvm::ISD::ArgFlagsTy::getByValSize(), llvm::EVT::getStoreSize(), llvm::ISD::ArgFlagsTy::isByVal(), and llvm::ISD::ArgFlagsTy::isInConsecutiveRegs().

Referenced by buildCallOperands(), CalculateStackSlotUsed(), and EnsureStackAlignment().

◆ CalculateStackSlotUsed()

static bool CalculateStackSlotUsed ( EVT  ArgVT,
EVT  OrigVT,
ISD::ArgFlagsTy  Flags,
unsigned  PtrByteSize,
unsigned  LinkageSize,
unsigned  ParamAreaSize,
unsigned ArgOffset,
unsigned AvailableFPRs,
unsigned AvailableVRs,
bool  HasQPX 
)
static

CalculateStackSlotUsed - Return whether this argument will use its stack slot (instead of being passed in registers).

ArgOffset, AvailableFPRs, and AvailableVRs must hold the current argument position, and will be updated to account for this argument.

Definition at line 3564 of file PPCISelLowering.cpp.

References llvm::alignTo(), CalculateStackSlotAlignment(), CalculateStackSlotSize(), llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::ArgFlagsTy::isByVal(), llvm::ISD::ArgFlagsTy::isInConsecutiveRegsLast(), llvm::MVT::v16i8, llvm::MVT::v1i128, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i32, and llvm::MVT::v8i16.

Referenced by buildCallOperands(), EnsureStackAlignment(), and needStackSlotPassParameters().

◆ CalculateTailCallArgDest()

static void CalculateTailCallArgDest ( SelectionDAG DAG,
MachineFunction MF,
bool  isPPC64,
SDValue  Arg,
int  SPDiff,
unsigned  ArgOffset,
SmallVectorImpl< TailCallArgumentInfo > &  TailCallArguments 
)
static

◆ CalculateTailCallSPDiff()

static int CalculateTailCallSPDiff ( SelectionDAG DAG,
bool  isTailCall,
unsigned  ParamSize 
)
static

CalculateTailCallSPDiff - Get the amount the stack pointer has to be adjusted to accommodate the arguments for the tailcall.

Definition at line 4694 of file PPCISelLowering.cpp.

References Callee, llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::PPCFunctionInfo::getMinReservedArea(), isFunctionGlobalAddress(), and llvm::PPCFunctionInfo::setTailCallSPDelta().

Referenced by buildCallOperands().

◆ callIntrinsic()

static Instruction* callIntrinsic ( IRBuilder<> &  Builder,
Intrinsic::ID  Id 
)
static

◆ callsShareTOCBase()

static bool callsShareTOCBase ( const Function Caller,
SDValue  Callee,
const TargetMachine TM 
)
static

◆ CC_AIX()

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

◆ combineADDToADDZE()

static SDValue combineADDToADDZE ( SDNode N,
SelectionDAG DAG,
const PPCSubtarget Subtarget 
)
static

◆ combineADDToMAT_PCREL_ADDR()

static SDValue combineADDToMAT_PCREL_ADDR ( SDNode N,
SelectionDAG DAG,
const PPCSubtarget Subtarget 
)
static

Definition at line 16742 of file PPCISelLowering.cpp.

References llvm::ISD::ABS, llvm::APInt::abs(), llvm::ISD::ADD, areCallingConvEligibleForTCO_64SVR4(), assert(), llvm::LegalizeActions::Bitcast, llvm::ISD::BITCAST, combineADDToADDZE(), Cond, llvm::PPC::DIR_PWR10, llvm::PPC::DIR_PWR8, llvm::PPC::DIR_PWR9, llvm::PPC::DIR_PWR_FUTURE, DisableSCO, DL, llvm::dyn_cast(), llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FMA, llvm::ConstantSDNode::getAPIntValue(), llvm::CallBase::getCalledFunction(), llvm::Function::getCallingConv(), llvm::CallBase::getCallingConv(), llvm::TargetLowering::getCheaperNegatedExpression(), llvm::SelectionDAG::getConstant(), llvm::SDNode::getFlags(), llvm::MachineFunction::getFunction(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::GlobalAddressSDNode::getOffset(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::User::getOperand(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::SelectionDAG::getTargetConstant(), llvm::GlobalAddressSDNode::getTargetFlags(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::ConstantSDNode::getZExtValue(), llvm::Function::hasMinSize(), llvm::SDNodeFlags::hasNoSignedZeros(), llvm::SDValue::hasOneUse(), llvm::Function::hasOptSize(), llvm::MVT::i128, llvm::MVT::i32, llvm::MVT::i64, invertFMAOpcode(), llvm::isConstOrConstSplat(), llvm::APInt::isNegative(), llvm::TargetLoweringBase::isOperationLegal(), llvm::CallInst::isTailCall(), llvm::isUInt< 16 >(), llvm::PPCSubtarget::isUsingPCRelativeCalls(), llvm::Function::isVarArg(), llvm::BitmaskEnumDetail::Mask(), llvm::PPCISD::MAT_PCREL_ADDR, llvm::ISD::MUL, llvm::TargetOptions::NoSignedZerosFPMath, llvm::TargetMachine::Options, llvm::ISD::SETCC, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SHL, llvm::TargetMachine::shouldAssumeDSOLocal(), llvm::ISD::SRL, llvm::ISD::SUB, std::swap(), llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8i16, llvm::PPCISD::VABSD, llvm::ISD::VSELECT, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.

◆ combineBVOfConsecutiveLoads()

static SDValue combineBVOfConsecutiveLoads ( SDNode N,
SelectionDAG DAG 
)
static

◆ combineBVOfVecSExt()

static SDValue combineBVOfVecSExt ( SDNode N,
SelectionDAG DAG 
)
static

Definition at line 14040 of file PPCISelLowering.cpp.

References addShuffleForVecExtend(), llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::BUILD_VECTOR, combineBVOfConsecutiveLoads(), llvm::dyn_cast(), llvm::MipsISD::Ext, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MVT::f32, llvm::MVT::f64, llvm::PPCISD::FCFID, llvm::PPCISD::FCFIDS, llvm::PPCISD::FCFIDU, llvm::PPCISD::FCFIDUS, llvm::PPCISD::FCTIDUZ, llvm::PPCISD::FCTIDZ, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getMemOperand(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getSimpleVT(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::SelectionDAG::getVTList(), llvm::ConstantSDNode::getZExtValue(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::DataLayout::isLittleEndian(), llvm::ISD::LOAD, llvm::PPCISD::LXSIZX, llvm::PPCISD::MFVSR, llvm::MVT::Other, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, Signed, llvm::ISD::SINT_TO_FP, llvm::PPCISD::SINT_VEC_TO_FP, llvm::ISD::UINT_TO_FP, llvm::PPCISD::UINT_VEC_TO_FP, llvm::PPCTargetLowering::useSoftFloat(), llvm::MVT::v2f64, llvm::MVT::v4i32, and llvm::PPCISD::VEXTS.

◆ CreateCopyOfByValArgument()

static SDValue CreateCopyOfByValArgument ( SDValue  Src,
SDValue  Dst,
SDValue  Chain,
ISD::ArgFlagsTy  Flags,
SelectionDAG DAG,
const SDLoc dl 
)
static

CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst" of size "Size".

Alignment information is specified by the specific parameter attribute. The copy will be passed as a byval function parameter. Sometimes what we are copying is the end of a larger object, the part that does not fit in registers.

Definition at line 5106 of file PPCISelLowering.cpp.

References llvm::ISD::ArgFlagsTy::getByValSize(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getMemcpy(), llvm::ISD::ArgFlagsTy::getNonZeroByValAlign(), and llvm::MVT::i32.

Referenced by buildCallOperands().

◆ EmitTailCallStoreFPAndRetAddr()

static SDValue EmitTailCallStoreFPAndRetAddr ( SelectionDAG DAG,
SDValue  Chain,
SDValue  OldRetAddr,
SDValue  OldFP,
int  SPDiff,
const SDLoc dl 
)
static

◆ EnsureStackAlignment()

static unsigned EnsureStackAlignment ( const PPCFrameLowering Lowering,
unsigned  NumBytes 
)
static

EnsureStackAlignment - Round stack frame size up from NumBytes to ensure minimum alignment required for target.

Definition at line 3619 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::MachineFunction::addLiveIn(), llvm::PPCFunctionInfo::addLiveInAttr(), llvm::alignTo(), llvm::CCState::AllocateStack(), Arg, llvm::Function::arg_begin(), llvm::array_lengthof(), assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::ISD::BITCAST, llvm::PPCISD::BUILD_SPE64, CalculateStackSlotAlignment(), CalculateStackSlotSize(), CalculateStackSlotUsed(), llvm::CC_PPC32_SVR4(), llvm::CC_PPC32_SVR4_ByVal(), llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineFrameInfo::CreateStackObject(), llvm::Depth, llvm::numbers::e, llvm::SmallVectorBase< SmallVectorSizeType< T > >::empty(), llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::CallingConv::Fast, llvm::ISD::ArgFlagsTy::getByValSize(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachineFunction::getDataLayout(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::PPCSubtarget::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::PPCFrameLowering::getLinkageSize(), llvm::MachineRegisterInfo::getLiveInVirtReg(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::MachineFunction::getRegInfo(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::TargetFrameLowering::getStackAlign(), llvm::SelectionDAG::getStore(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SelectionDAG::getTruncStore(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::PPCFunctionInfo::getVarArgsFrameIndex(), llvm::GPR, llvm::TargetOptions::GuaranteedTailCallOpt, llvm::PPCSubtarget::hasP8Vector(), llvm::PPCSubtarget::hasQPX(), llvm::PPCSubtarget::hasSPE(), llvm::PPCTargetLowering::hasSPE(), llvm::MachineFrameInfo::hasVAStart(), llvm::PPCSubtarget::hasVSX(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::MipsISD::Ins, llvm::PPCSubtarget::is32BitELFABI(), llvm::PPCSubtarget::is64BitELFABI(), llvm::PPCSubtarget::isAIXABI(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::PPCSubtarget::isELFv2ABI(), llvm::ISD::ArgFlagsTy::isInConsecutiveRegs(), llvm::ISD::ArgFlagsTy::isInConsecutiveRegsLast(), llvm::PPCSubtarget::isLittleEndian(), llvm::CCValAssign::isMemLoc(), llvm::ISD::ArgFlagsTy::isNest(), llvm::CCValAssign::isRegLoc(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::ISD::ArgFlagsTy::isZExt(), LLVM_FALLTHROUGH, llvm_unreachable, llvm::max(), llvm::min(), llvm::TargetMachine::Options, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), R4, R6, Reg, llvm::PPCFunctionInfo::setMinReservedArea(), llvm::PPCFunctionInfo::setVarArgsFrameIndex(), llvm::PPCFunctionInfo::setVarArgsNumFPR(), llvm::PPCFunctionInfo::setVarArgsNumGPR(), llvm::PPCFunctionInfo::setVarArgsStackOffset(), llvm::MVT::SimpleTy, llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::ISD::SRL, llvm::SPII::Store, std::swap(), llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::PPCTargetLowering::useSoftFloat(), llvm::MVT::v16i8, llvm::MVT::v1i128, llvm::NVPTX::PTXLdStInstCode::V2, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::NVPTX::PTXLdStInstCode::V4, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i32, and llvm::MVT::v8i16.

Referenced by buildCallOperands().

◆ findConsecutiveLoad()

static bool findConsecutiveLoad ( LoadSDNode LD,
SelectionDAG DAG 
)
static

◆ fixupFuncForFI()

static void fixupFuncForFI ( SelectionDAG DAG,
int  FrameIdx,
EVT  VT 
)
static

◆ fixupShuffleMaskForPermutedSToV()

static void fixupShuffleMaskForPermutedSToV ( SmallVectorImpl< int > &  ShuffV,
int  LHSMaxIdx,
int  RHSMinIdx,
int  RHSMaxIdx,
int  HalfVec 
)
static

◆ generateEquivalentSub()

static SDValue generateEquivalentSub ( SDNode N,
int  Size,
bool  Complement,
bool  Swap,
SDLoc DL,
SelectionDAG DAG 
)
static

This function is called when we have proved that a SETCC node can be replaced by subtraction (and other supporting instructions) so that the result of comparison is kept in a GPR instead of CR.

This function is purely for codegen purposes and has some flags to guide the codegen process.

Definition at line 13140 of file PPCISelLowering.cpp.

References llvm::MCID::Add, llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::SmallVectorTemplateCommon< T >::back(), C, llvm::APInt::clearBit(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::count(), DL, llvm::SmallVectorBase< SmallVectorSizeType< T > >::empty(), llvm::sys::path::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::SelectionDAG::getAnyExtOrTrunc(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), llvm::APInt::getHighBitsSet(), llvm::APInt::getLowBitsSet(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getSetCC(), llvm::SelectionDAG::getSExtOrTrunc(), llvm::TargetLoweringBase::getShiftAmountTy(), llvm::SDValue::getValue(), llvm::SDValue::getValueSizeInBits(), llvm::SDNode::getValueSizeInBits(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::SDValue::hasOneUse(), llvm::MVT::i1, llvm::MVT::i32, llvm::MVT::i64, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::insert(), llvm::isNullConstant(), llvm::ISD::isSignedIntSetCC(), llvm::ISD::isUnsignedIntSetCC(), llvm::SelectionDAG::MaskedValueIsZero(), llvm::KnownBits::One, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::ISD::OR, llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SelectionDAG::ReplaceAllUsesOfValueWith(), llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SETEQ, llvm::ISD::SETNE, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, Size, llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, std::swap(), llvm::ISD::TRUNCATE, llvm::SDNode::use_begin(), llvm::SDNode::use_end(), llvm::ISD::XOR, llvm::KnownBits::Zero, and llvm::ISD::ZERO_EXTEND.

◆ GeneratePerfectShuffle()

static SDValue GeneratePerfectShuffle ( unsigned  PFEntry,
SDValue  LHS,
SDValue  RHS,
SelectionDAG DAG,
const SDLoc dl 
)
static

GeneratePerfectShuffle - Given an entry in the perfect-shuffle table, emit the specified operations to build the shuffle.

Definition at line 9495 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ISD::BITCAST, llvm::ISD::BSWAP, llvm::ISD::BUILD_VECTOR, BuildVSLDOI(), llvm::dbgs(), DL, llvm::SDValue::dump(), llvm::SDNode::dump(), llvm::dyn_cast(), llvm::numbers::e, llvm::SmallVectorTemplateCommon< T >::end(), llvm::LoadSDNode::getBasePtr(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getCommutedVectorShuffle(), llvm::SelectionDAG::getConstant(), llvm::SDValue::getConstantOperandVal(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getIntPtrConstant(), llvm::ShuffleVectorSDNode::getMask(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), getNormalLoadInput(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getSizeInBits(), llvm::PPC::getSplatIdxForPPCMnemonics(), llvm::ShuffleVectorSDNode::getSplatIndex(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::SelectionDAG::getVTList(), llvm::APInt::getZExtValue(), llvm::SDNode::hasOneUse(), llvm::MVT::i128, llvm::MVT::i32, llvm::BuildVectorSDNode::isConstantSplat(), isNByteElemShuffleMask(), llvm::PPC::isQVALIGNIShuffleMask(), llvm::ShuffleVectorSDNode::isSplat(), llvm::PPC::isSplatShuffleMask(), llvm::SDValue::isUndef(), llvm::PPC::isVMRGEOShuffleMask(), llvm::PPC::isVMRGHShuffleMask(), llvm::PPC::isVMRGLShuffleMask(), llvm::PPC::isVPKUDUMShuffleMask(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), llvm::PPC::isVSLDOIShuffleMask(), llvm::PPC::isXXBRDShuffleMask(), llvm::PPC::isXXBRHShuffleMask(), llvm::PPC::isXXBRQShuffleMask(), llvm::PPC::isXXBRWShuffleMask(), llvm::PPC::isXXINSERTWMask(), llvm::PPC::isXXPERMDIShuffleMask(), llvm::PPC::isXXSLDWIShuffleMask(), llvm::ARM_MB::LD, llvm::PPCISD::LD_SPLAT, LLVM_DEBUG, llvm_unreachable, llvm::BitmaskEnumDetail::Mask(), N, OP_COPY, llvm::ISD::OR, llvm::MVT::Other, llvm::peekThroughBitcasts(), PerfectShuffleTable, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::PPCISD::QVALIGNI, llvm::PPCISD::QVESPLATI, llvm::PPCISD::QVFPERM, llvm::PPCISD::QVGPCI, rotate, llvm::ISD::ROTL, llvm::ISD::SHL, llvm::ISD::SRL, std::swap(), llvm::PPCISD::SWAP_NO_CHAIN, llvm::MVT::v16i8, llvm::MVT::v1i128, llvm::NVPTX::PTXLdStInstCode::V2, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f64, llvm::MVT::v4i32, llvm::MVT::v8i16, llvm::PPCISD::VECINSERT, llvm::PPCISD::VECSHL, llvm::NVPTX::VecShuffle, llvm::PPCISD::VPERM, llvm::PPCISD::XXPERMDI, llvm::PPCISD::XXSPLT, and llvm::PPCISD::XXSPLTI32DX.

◆ getBaseWithConstantOffset()

static void getBaseWithConstantOffset ( SDValue  Loc,
SDValue Base,
int64_t &  Offset,
SelectionDAG DAG 
)
static

◆ getCallOpcode()

static unsigned getCallOpcode ( PPCTargetLowering::CallFlags  CFlags,
const Function Caller,
const SDValue Callee,
const PPCSubtarget Subtarget,
const TargetMachine TM 
)
static

◆ getCanonicalConstSplat()

static SDValue getCanonicalConstSplat ( uint64_t  Val,
unsigned  SplatSize,
EVT  VT,
SelectionDAG DAG,
const SDLoc dl 
)
static

getCanonicalConstSplat - Build a canonical splat immediate of Val with an element size of SplatSize.

Cast the result to VT.

Definition at line 8981 of file PPCISelLowering.cpp.

References llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getConstant(), llvm::MVT::Other, llvm::MVT::v16i8, llvm::MVT::v4i32, and llvm::MVT::v8i16.

Referenced by llvm::convertToNonDenormSingle(), and getVectorCompareInfo().

◆ getEstimateRefinementSteps()

static int getEstimateRefinementSteps ( EVT  VT,
const PPCSubtarget Subtarget 
)
static

◆ getLabelAccessInfo()

static void getLabelAccessInfo ( bool  IsPIC,
const PPCSubtarget Subtarget,
unsigned HiOpFlags,
unsigned LoOpFlags,
const GlobalValue GV = nullptr 
)
static

Return true if we should reference labels using a PICBase, set the HiOpFlags and LoOpFlags to the target MO flags.

Definition at line 2829 of file PPCISelLowering.cpp.

References llvm::PPCII::MO_HA, llvm::PPCII::MO_LO, and llvm::PPCII::MO_PIC_FLAG.

Referenced by llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(), and setUsesTOCBasePtr().

◆ getMaxByValAlign()

static void getMaxByValAlign ( Type Ty,
Align MaxAlign,
Align  MaxMaxAlign 
)
static

getMaxByValAlign - Helper for getByValTypeAlignment to determine the desired ByVal argument alignment.

Definition at line 1391 of file PPCISelLowering.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align.

Referenced by llvm::PPCTargetLowering::getByValTypeAlignment().

◆ getNormalLoadInput()

static const SDValue* getNormalLoadInput ( const SDValue Op)
static

◆ getOutputChainFromCallSeq()

static SDValue getOutputChainFromCallSeq ( SDValue  CallSeqStart)
static

◆ getRegClassForSVT()

static const TargetRegisterClass* getRegClassForSVT ( MVT::SimpleValueType  SVT,
bool  IsPPC64 
)
static

◆ getSToVPermuted()

static SDValue getSToVPermuted ( SDValue  OrigSToV,
SelectionDAG DAG 
)
static

◆ getVectorCompareInfo()

static bool getVectorCompareInfo ( SDValue  Intrin,
int &  CompareOpc,
bool isDot,
const PPCSubtarget Subtarget 
)
static

getVectorCompareInfo - Given an intrinsic, return false if it is not a vector comparison.

If it is, return true and fill in Opc/isDot with information about the intrinsic.

Definition at line 10233 of file PPCISelLowering.cpp.

References llvm::ISD::ABS, llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::ATOMIC_CMP_SWAP, llvm::PPCISD::ATOMIC_CMP_SWAP_16, llvm::PPCISD::ATOMIC_CMP_SWAP_8, llvm::ISD::BITCAST, llvm::ISD::BSWAP, llvm::ISD::BUILD_VECTOR, BuildIntrinsicOp(), C, llvm::MachineFrameInfo::CreateStackObject(), DL, llvm::dyn_cast(), llvm::numbers::e, llvm::ISD::EXTLOAD, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FADD, llvm::ISD::FMA, llvm::ISD::FMUL, llvm::ISD::FP_EXTEND, llvm::PPCISD::FP_EXTEND_HALF, llvm::ISD::FSUB, llvm::MemSDNode::getAAInfo(), llvm::LSBaseSDNode::getAddressingMode(), llvm::MemSDNode::getAlignment(), llvm::LoadSDNode::getBasePtr(), llvm::StoreSDNode::getBasePtr(), llvm::SelectionDAG::getBuildVector(), getCanonicalConstSplat(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::LoadSDNode::getExtensionType(), llvm::SelectionDAG::getExtLoad(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineMemOperand::getFlags(), llvm::SDNode::getFlags(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::APInt::getHighBitsSet(), llvm::SelectionDAG::getIndexedLoad(), llvm::SelectionDAG::getIndexedStore(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getMergeValues(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::LoadSDNode::getOffset(), llvm::StoreSDNode::getOffset(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::MemSDNode::getPointerInfo(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::EVT::getScalarType(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::EVT::getStoreSize(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTruncStore(), llvm::SDValue::getValue(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVectorIdxConstant(), llvm::SelectionDAG::getVectorShuffle(), llvm::SelectionDAG::getVTList(), llvm::MachinePointerInfo::getWithOffset(), llvm::MVT::Glue, llvm::PPCSubtarget::hasP8Altivec(), llvm::PPCSubtarget::hasP9Altivec(), llvm::PPCSubtarget::hasVSX(), llvm::MVT::i1, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::ISD::INSERT_VECTOR_ELT, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::tgtok::IntVal, llvm::LSBaseSDNode::isIndexed(), llvm::LSBaseSDNode::isUnindexed(), llvm::ARM_MB::LD, llvm::PPCISD::LD_VSX_LH, llvm_unreachable, llvm::SPII::Load, llvm::ISD::LOAD, llvm::SelectionDAG::MaskedValueIsZero(), llvm::PPCISD::MFOCRF, llvm::MinAlign(), llvm::PPCISD::MTVSRZ, llvm::MVT::Other, llvm::ISD::PRE_INC, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::PPCISD::QBFLT, R2, llvm::ISD::SRL, llvm::SPII::Store, llvm::ISD::SUB, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::MVT::v16i8, llvm::NVPTX::PTXLdStInstCode::V2, llvm::MVT::v2f32, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i32, llvm::MVT::v8i16, llvm::PPCISD::VCMP, llvm::PPCISD::VCMPo, llvm::PPCISD::VECINSERT, X, llvm::ISD::XOR, and Y.

Referenced by llvm::PPCTargetLowering::PerformDAGCombine().

◆ hasSameArgumentList()

static bool hasSameArgumentList ( const Function CallerFn,
const CallBase CB 
)
static

◆ haveEfficientBuildVectorPattern()

static bool haveEfficientBuildVectorPattern ( BuildVectorSDNode V,
bool  HasDirectMove,
bool  HasP8Vector 
)
static

Do we have an efficient pattern in a .td file for this node?

Parameters
V- pointer to the BuildVectorSDNode being matched
HasDirectMove- does this subtarget have VSR <-> GPR direct moves?

There are some patterns where it is beneficial to keep a BUILD_VECTOR node as a BUILD_VECTOR node rather than expanding it. The patterns where the opposite is true (expansion is beneficial) are:

  • The node builds a vector out of integers that are not 32 or 64-bits
  • The node builds a vector out of constants
  • The node is a "load-and-splat" In all other cases, we will choose to keep the BUILD_VECTOR.

Definition at line 9057 of file PPCISelLowering.cpp.

References llvm::PPCISD::BUILD_FP128, llvm::ISD::BUILD_PAIR, llvm::numbers::e, llvm::MVT::f128, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::MVT::i64, llvm::BuildVectorSDNode::isConstant(), llvm::SDNode::isOnlyUserOf(), llvm::SDValue::isUndef(), llvm::ISD::LOAD, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, and llvm::MVT::v4i32.

Referenced by llvm::convertToNonDenormSingle().

◆ invertFMAOpcode()

static unsigned invertFMAOpcode ( unsigned  Opc)
static

Definition at line 16458 of file PPCISelLowering.cpp.

References llvm::ISD::FMA, llvm::PPCISD::FNMSUB, and llvm_unreachable.

Referenced by combineADDToMAT_PCREL_ADDR().

◆ isAlternatingShuffMask()

static bool isAlternatingShuffMask ( const ArrayRef< int > &  Mask,
int  NumElts 
)
static

Definition at line 14513 of file PPCISelLowering.cpp.

References llvm::numbers::e, and llvm::ArrayRef< T >::size().

Referenced by getSToVPermuted().

◆ isBLACompatibleAddress()

static SDNode* isBLACompatibleAddress ( SDValue  Op,
SelectionDAG DAG 
)
static

isCallCompatibleAddress - Return the immediate to use if the specified 32-bit value is representable in the immediate field of a BxA instruction.

Definition at line 4999 of file PPCISelLowering.cpp.

References Arg, C, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), llvm::SDValue::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetLoweringInfo(), and llvm::ConstantSDNode::getZExtValue().

Referenced by isIndirectCall(), and transformCallee().

◆ isConsecutiveLS()

static bool isConsecutiveLS ( SDNode N,
LSBaseSDNode Base,
unsigned  Bytes,
int  Dist,
SelectionDAG DAG 
)
static

◆ isConsecutiveLSLoc()

static bool isConsecutiveLSLoc ( SDValue  Loc,
EVT  VT,
LSBaseSDNode Base,
unsigned  Bytes,
int  Dist,
SelectionDAG DAG 
)
static

◆ isConstantOrUndef()

static bool isConstantOrUndef ( int  Op,
int  Val 
)
static

isConstantOrUndef - Op is either an undef node or a ConstantSDNode.

Return true if Op is undef or if it matches the specified value.

Definition at line 1618 of file PPCISelLowering.cpp.

Referenced by llvm::PPC::isQVALIGNIShuffleMask(), isVMerge(), llvm::PPC::isVPKUDUMShuffleMask(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), and llvm::PPC::isVSLDOIShuffleMask().

◆ isFloatingPointZero()

static bool isFloatingPointZero ( SDValue  Op)
static

isFloatingPointZero - Return true if this is 0.0 or -0.0.

Definition at line 1604 of file PPCISelLowering.cpp.

References llvm::HexagonISD::CP, llvm::SDValue::getNode(), llvm::SDValue::getOperand(), llvm::ISD::isEXTLoad(), and llvm::ISD::isNON_EXTLoad().

◆ isFPExtLoad()

static bool isFPExtLoad ( SDValue  Op)
static

◆ isFunctionGlobalAddress()

static bool isFunctionGlobalAddress ( SDValue  Callee)
static

◆ isIndirectCall()

static bool isIndirectCall ( const SDValue Callee,
SelectionDAG DAG,
const PPCSubtarget Subtarget,
bool  isPatchPoint 
)
static

◆ isNByteElemShuffleMask()

static bool isNByteElemShuffleMask ( ShuffleVectorSDNode N,
unsigned  Width,
int  StepLen 
)
static

Check that the mask is shuffling N byte elements.

Within each N byte element of the mask, the indices could be either in increasing or decreasing order as long as they are consecutive.

Parameters
[in]Nthe shuffle vector SD Node to analyze
[in]Widththe element width in bytes, could be 2/4/8/16 (HalfWord/ Word/DoubleWord/QuadWord).
[in]StepLenthe delta indices number among the N byte element, if the mask is in increasing/decreasing order then it is 1/-1.
Returns
true iff the mask is shuffling N byte elements.

Definition at line 1993 of file PPCISelLowering.cpp.

References assert(), and llvm::ShuffleVectorSDNode::getMaskElt().

Referenced by GeneratePerfectShuffle(), isXXBRShuffleMaskHelper(), llvm::PPC::isXXINSERTWMask(), llvm::PPC::isXXPERMDIShuffleMask(), and llvm::PPC::isXXSLDWIShuffleMask().

◆ isScalarToVec()

static SDValue isScalarToVec ( SDValue  Op)
static

◆ isSplatBV()

static bool isSplatBV ( SDValue  Op)
static

◆ isTOCSaveRestoreRequired()

static bool isTOCSaveRestoreRequired ( const PPCSubtarget Subtarget)
inlinestatic

◆ isValidPCRelNode()

template<typename Ty >
static bool isValidPCRelNode ( SDValue  N)
static

Definition at line 2667 of file PPCISelLowering.cpp.

References llvm::dyn_cast(), llvm::PPCII::MO_PCREL_FLAG, and N.

◆ isVMerge() [1/2]

static bool isVMerge ( ShuffleVectorSDNode N,
unsigned  UnitSize,
unsigned  LHSStart,
unsigned  RHSStart 
)
static

◆ isVMerge() [2/2]

static bool isVMerge ( ShuffleVectorSDNode N,
unsigned  IndexOffset,
unsigned  RHSStartValue 
)
static

Common function used to match vmrgew and vmrgow shuffles.

The indexOffset determines whether to look for even or odd words in the shuffle mask. This is based on the of the endianness of the target machine.

  • Little Endian:
    • Use offset of 0 to check for odd elements
    • Use offset of 4 to check for even elements
  • Big Endian:

The mask to the shuffle vector instruction specifies the indices of the elements from the two input vectors to place in the result. The elements are numbered in array-access order, starting with the first vector. These vectors are always of type v16i8, thus each vector will contain 16 elements of size

  1. More info on the shuffle vector can be found in the http://llvm.org/docs/LangRef.html#shufflevector-instruction Language Reference.

The RHSStartValue indicates whether the same input vectors are used (unary) or two different input vectors are used, based on the following:

  • If the instruction uses the same vector for both inputs, the range of the indices will be 0 to 15. In this case, the RHSStart value passed should be 0.
  • If the instruction has two different vectors then the range of the indices will be 0 to 31. In this case, the RHSStart value passed should be 16 (indices 0-15 specify elements in the first vector while indices 16 to 31 specify elements in the second vector).
Parameters
[in]NThe shuffle vector SD Node to analyze
[in]IndexOffsetSpecifies whether to look for even or odd elements
[in]RHSStartValueSpecifies the starting index for the righthand input vector to the shuffle_vector instruction
Returns
true iff this shuffle vector represents an even or odd word merge

Definition at line 1850 of file PPCISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), isConstantOrUndef(), and llvm::MVT::v16i8.

◆ isXXBRShuffleMaskHelper()

static bool isXXBRShuffleMaskHelper ( ShuffleVectorSDNode N,
int  Width 
)
static

◆ LowerLabelRef()

static SDValue LowerLabelRef ( SDValue  HiPart,
SDValue  LoPart,
bool  isPIC,
SelectionDAG DAG 
)
static

◆ LowerMemOpCallTo()

static void LowerMemOpCallTo ( SelectionDAG DAG,
MachineFunction MF,
SDValue  Chain,
SDValue  Arg,
SDValue  PtrOff,
int  SPDiff,
unsigned  ArgOffset,
bool  isPPC64,
bool  isTailCall,
bool  isVector,
SmallVectorImpl< SDValue > &  MemOpChains,
SmallVectorImpl< TailCallArgumentInfo > &  TailCallArguments,
const SDLoc dl 
)
static

◆ mapArgRegToOffsetAIX()

static unsigned mapArgRegToOffsetAIX ( unsigned  Reg,
const PPCFrameLowering FL 
)
static

◆ needStackSlotPassParameters()

static bool needStackSlotPassParameters ( const PPCSubtarget Subtarget,
const SmallVectorImpl< ISD::OutputArg > &  Outs 
)
static

◆ prepareDescriptorIndirectCall()

static void prepareDescriptorIndirectCall ( SelectionDAG DAG,
SDValue Callee,
SDValue Glue,
SDValue Chain,
SDValue  CallSeqStart,
const CallBase CB,
const SDLoc dl,
bool  hasNest,
const PPCSubtarget Subtarget 
)
static

◆ prepareIndirectCall()

static void prepareIndirectCall ( SelectionDAG DAG,
SDValue Callee,
SDValue Glue,
SDValue Chain,
const SDLoc dl 
)
static

◆ PrepareTailCall()

static void PrepareTailCall ( SelectionDAG DAG,
SDValue InFlag,
SDValue Chain,
const SDLoc dl,
int  SPDiff,
unsigned  NumBytes,
SDValue  LROp,
SDValue  FPOp,
SmallVectorImpl< TailCallArgumentInfo > &  TailCallArguments 
)
static

◆ setUsesTOCBasePtr() [1/2]

static void setUsesTOCBasePtr ( MachineFunction MF)
static

◆ setUsesTOCBasePtr() [2/2]

static void setUsesTOCBasePtr ( SelectionDAG DAG)
static

◆ STATISTIC() [1/4]

STATISTIC ( NumTailCalls  ,
"Number of tail calls  
)

◆ STATISTIC() [2/4]

STATISTIC ( NumSiblingCalls  ,
"Number of sibling calls  
)

◆ STATISTIC() [3/4]

STATISTIC ( ShufflesHandledWithVPERM  ,
"Number of shuffles lowered to a VPERM"   
)

◆ STATISTIC() [4/4]

STATISTIC ( NumDynamicAllocaProbed  ,
"Number of dynamic stack allocation probed"   
)

◆ StoreTailCallArgumentsToStackSlot()

static void StoreTailCallArgumentsToStackSlot ( SelectionDAG DAG,
SDValue  Chain,
const SmallVectorImpl< TailCallArgumentInfo > &  TailCallArgs,
SmallVectorImpl< SDValue > &  MemOpChains,
const SDLoc dl 
)
static

◆ stripModuloOnShift()

static SDValue stripModuloOnShift ( const TargetLowering TLI,
SDNode N,
SelectionDAG DAG 
)
static

◆ transformCallee()

static SDValue transformCallee ( const SDValue Callee,
SelectionDAG DAG,
const SDLoc dl,
const PPCSubtarget Subtarget 
)
static

Definition at line 5311 of file PPCISelLowering.cpp.

References assert(), llvm::XCOFF::C_EXT, Context, llvm::dyn_cast(), F(), G, llvm::MachineModuleInfo::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMCSymbol(), llvm::SectionKind::getMetadata(), llvm::MachineFunction::getMMI(), llvm::Value::getName(), llvm::Module::getNamedValue(), llvm::SDValue::getNode(), llvm::GlobalValue::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetMachine::getRelocationModel(), llvm::TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(), llvm::MCSymbolXCOFF::getSymbolTableName(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::PPCSubtarget::getTargetMachine(), llvm::SDValue::getValueType(), llvm::MCSymbolXCOFF::hasRepresentedCsectSet(), llvm::PPCSubtarget::is32BitELFABI(), llvm::PPCSubtarget::isAIXABI(), isBLACompatibleAddress(), llvm::GlobalValue::isDeclaration(), llvm::PPCSubtarget::isELFv2ABI(), isFunctionGlobalAddress(), llvm::PPCII::MO_PLT, llvm::Mod, llvm::Reloc::PIC_, llvm::PPCISD::SC, llvm::MCSymbolXCOFF::setRepresentedCsect(), llvm::TargetMachine::shouldAssumeDSOLocal(), llvm::PPCSubtarget::usesFunctionDescriptors(), llvm::XCOFF::XMC_PR, and llvm::XCOFF::XTY_ER.

Referenced by buildCallOperands().

◆ truncateScalarIntegerArg()

static SDValue truncateScalarIntegerArg ( ISD::ArgFlagsTy  Flags,
EVT  ValVT,
SelectionDAG DAG,
SDValue  ArgValue,
MVT  LocVT,
const SDLoc dl 
)
static

◆ usePartialVectorLoads()

static bool usePartialVectorLoads ( SDNode N,
const PPCSubtarget ST 
)
static

◆ widenVec()

static SDValue widenVec ( SelectionDAG DAG,
SDValue  Vec,
const SDLoc dl 
)
static

Definition at line 8495 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::ISD::AND, assert(), llvm::ISD::BITCAST, llvm::tgtok::Bits, llvm::BitWidth, llvm::ISD::CONCAT_VECTORS, Cond, llvm::MachineFrameInfo::CreateStackObject(), llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::PPCISD::FCFID, llvm::PPCISD::FCFIDS, llvm::PPCISD::FCFIDU, llvm::PPCISD::FCFIDUS, llvm::ISD::FMA, llvm::ISD::FP_ROUND, llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getSelectCC(), llvm::SelectionDAG::getSetCC(), llvm::PPCTargetLowering::getSetCCResultType(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MipsISD::Hi, llvm::MVT::i1, llvm::MVT::i32, llvm::MVT::i64, llvm::EVT::isFloatingPoint(), llvm::TargetLoweringBase::isOperationCustom(), llvm::EVT::isVector(), llvm::PPCISD::LFIWAX, llvm::PPCISD::LFIWZX, llvm::MipsISD::Lo, llvm::PPCISD::MFFS, llvm::MachineMemOperand::MOLoad, llvm::TargetMachine::Options, llvm::ISD::OR, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::PPCISD::QBFLT, llvm::ISD::SELECT, llvm::ISD::SETLE, llvm::ISD::SETUGT, llvm::ISD::SEXTLOAD, llvm::PPCISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SINT_TO_FP, llvm::PPCISD::SRA, llvm::ISD::SRA, llvm::PPCISD::SRL, llvm::ISD::SRL, llvm::SPII::Store, llvm::ISD::SUB, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::TargetOptions::UnsafeFPMath, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4f64, llvm::MVT::v4i1, llvm::MVT::v4i32, llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZEXTLOAD.

Variable Documentation

◆ ANDIGlueBug

cl::opt<bool> ANDIGlueBug

Referenced by mayUseP9Setb().

◆ DisableILPPref

cl::opt<bool> DisableILPPref("disable-ppc-ilp-pref", cl::desc("disable setting the node scheduling preference to ILP on PPC"), cl::Hidden)
static

◆ DisableInnermostLoopAlign32

cl::opt<bool> DisableInnermostLoopAlign32("disable-ppc-innermost-loop-align32", cl::desc("don't always align innermost loop to 32 bytes on ppc"), cl::Hidden)
static

◆ DisablePPCPreinc

cl::opt<bool> DisablePPCPreinc("disable-ppc-preinc", cl::desc("disable preincrement load/store generation on PPC"), cl::Hidden)
static

◆ DisablePPCUnaligned

cl::opt<bool> DisablePPCUnaligned("disable-ppc-unaligned", cl::desc("disable unaligned load/store generation on PPC"), cl::Hidden)
static

◆ DisableSCO

cl::opt<bool> DisableSCO("disable-ppc-sco", cl::desc("disable sibling call optimization on ppc"), cl::Hidden)
static

◆ FPR

const MCPhysReg FPR[]
static
Initial value:
= {PPC::F1, PPC::F2, PPC::F3, PPC::F4, PPC::F5,
PPC::F6, PPC::F7, PPC::F8, PPC::F9, PPC::F10,
PPC::F11, PPC::F12, PPC::F13}

FPR - The set of FP registers that should be allocated for arguments on Darwin and AIX.

Definition at line 3491 of file PPCISelLowering.cpp.

Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo(), and llvm::SystemZMachineFunctionInfo::setVarArgsFirstFPR().

◆ QFPR

const MCPhysReg QFPR[]
static
Initial value:
= {
PPC::QF1, PPC::QF2, PPC::QF3, PPC::QF4, PPC::QF5, PPC::QF6, PPC::QF7,
PPC::QF8, PPC::QF9, PPC::QF10, PPC::QF11, PPC::QF12, PPC::QF13}

QFPR - The set of QPX registers that should be allocated for arguments.

Definition at line 3496 of file PPCISelLowering.cpp.

◆ UseAbsoluteJumpTables

cl::opt<bool> UseAbsoluteJumpTables("ppc-use-absolute-jumptables", cl::desc("use absolute jump tables on ppc"), cl::Hidden)
static