LLVM  16.0.0git
Functions
SparcISelLowering.cpp File Reference
#include "SparcISelLowering.h"
#include "MCTargetDesc/SparcMCExpr.h"
#include "SparcMachineFunctionInfo.h"
#include "SparcRegisterInfo.h"
#include "SparcTargetMachine.h"
#include "SparcTargetObjectFile.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.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/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "SparcGenCallingConv.inc"
Include dependency graph for SparcISelLowering.cpp:

Go to the source code of this file.

Functions

static bool CC_Sparc_Assign_SRet (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool CC_Sparc_Assign_Split_64 (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool CC_Sparc_Assign_Ret_Split_64 (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool Analyze_CC_Sparc64_Full (bool IsReturn, unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool Analyze_CC_Sparc64_Half (bool IsReturn, unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool CC_Sparc64_Full (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool CC_Sparc64_Half (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool RetCC_Sparc64_Full (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool RetCC_Sparc64_Half (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static unsigned toCallerWindow (unsigned Reg)
 
static bool hasReturnsTwiceAttr (SelectionDAG &DAG, SDValue Callee, const CallBase *Call)
 
static void fixupVariableFloatArgs (SmallVectorImpl< CCValAssign > &ArgLocs, ArrayRef< ISD::OutputArg > Outs)
 
static SPCC::CondCodes intCondCCodeToRcond (ISD::CondCode CC)
 intCondCCodeToRcond - Convert a DAG integer condition code to a SPARC rcond condition. More...
 
static SPCC::CondCodes IntCondCCodeToICC (ISD::CondCode CC)
 IntCondCCodeToICC - Convert a DAG integer condition code to a SPARC ICC condition. More...
 
static SPCC::CondCodes FPCondCCodeToFCC (ISD::CondCode CC)
 FPCondCCodeToFCC - Convert a DAG floatingp oint condition code to a SPARC FCC condition. More...
 
static void LookThroughSetCC (SDValue &LHS, SDValue &RHS, ISD::CondCode CC, unsigned &SPCC)
 
static SDValue LowerF128_FPEXTEND (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
 
static SDValue LowerF128_FPROUND (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
 
static SDValue LowerFP_TO_SINT (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
 
static SDValue LowerSINT_TO_FP (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
 
static SDValue LowerFP_TO_UINT (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
 
static SDValue LowerUINT_TO_FP (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
 
static SDValue LowerBR_CC (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad, bool isV9)
 
static SDValue LowerSELECT_CC (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad, bool isV9, bool is64Bit)
 
static SDValue LowerVASTART (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
 
static SDValue LowerVAARG (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerDYNAMIC_STACKALLOC (SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
 
static SDValue getFLUSHW (SDValue Op, SelectionDAG &DAG)
 
static SDValue getFRAMEADDR (uint64_t depth, SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget, bool AlwaysFlush=false)
 
static SDValue LowerFRAMEADDR (SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
 
static SDValue LowerRETURNADDR (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, const SparcSubtarget *Subtarget)
 
static SDValue LowerF64Op (SDValue SrcReg64, const SDLoc &dl, SelectionDAG &DAG, unsigned opcode)
 
static SDValue LowerF128Load (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerLOAD (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerF128Store (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerSTORE (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerFNEGorFABS (SDValue Op, SelectionDAG &DAG, bool isV9)
 
static SDValue LowerADDC_ADDE_SUBC_SUBE (SDValue Op, SelectionDAG &DAG)
 
static SDValue LowerUMULO_SMULO (SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
 
static SDValue LowerATOMIC_LOAD_STORE (SDValue Op, SelectionDAG &DAG)
 

Function Documentation

◆ Analyze_CC_Sparc64_Full()

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

◆ Analyze_CC_Sparc64_Half()

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

◆ CC_Sparc64_Full()

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

Definition at line 192 of file SparcISelLowering.cpp.

References Analyze_CC_Sparc64_Full().

◆ CC_Sparc64_Half()

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

Definition at line 199 of file SparcISelLowering.cpp.

References Analyze_CC_Sparc64_Half().

◆ CC_Sparc_Assign_Ret_Split_64()

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

◆ CC_Sparc_Assign_Split_64()

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

◆ CC_Sparc_Assign_SRet()

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

◆ fixupVariableFloatArgs()

static void fixupVariableFloatArgs ( SmallVectorImpl< CCValAssign > &  ArgLocs,
ArrayRef< ISD::OutputArg Outs 
)
static

◆ FPCondCCodeToFCC()

static SPCC::CondCodes FPCondCCodeToFCC ( ISD::CondCode  CC)
static

◆ getFLUSHW()

static SDValue getFLUSHW ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ getFRAMEADDR()

static SDValue getFRAMEADDR ( uint64_t  depth,
SDValue  Op,
SelectionDAG DAG,
const SparcSubtarget Subtarget,
bool  AlwaysFlush = false 
)
static

◆ hasReturnsTwiceAttr()

static bool hasReturnsTwiceAttr ( SelectionDAG DAG,
SDValue  Callee,
const CallBase Call 
)
static

◆ IntCondCCodeToICC()

static SPCC::CondCodes IntCondCCodeToICC ( ISD::CondCode  CC)
static

◆ intCondCCodeToRcond()

static SPCC::CondCodes intCondCCodeToRcond ( ISD::CondCode  CC)
static

intCondCCodeToRcond - Convert a DAG integer condition code to a SPARC rcond condition.

Definition at line 1479 of file SparcISelLowering.cpp.

References CC, llvm_unreachable, llvm::SPCC::REG_GEZ, llvm::SPCC::REG_GZ, llvm::SPCC::REG_LEZ, llvm::SPCC::REG_LZ, llvm::SPCC::REG_NZ, llvm::SPCC::REG_Z, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, and llvm::ISD::SETNE.

Referenced by LowerSELECT_CC().

◆ LookThroughSetCC()

static void LookThroughSetCC ( SDValue LHS,
SDValue RHS,
ISD::CondCode  CC,
unsigned &  SPCC 
)
static

◆ LowerADDC_ADDE_SUBC_SUBE()

static SDValue LowerADDC_ADDE_SUBC_SUBE ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerATOMIC_LOAD_STORE()

static SDValue LowerATOMIC_LOAD_STORE ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerBR_CC()

static SDValue LowerBR_CC ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad,
bool  isV9 
)
static

◆ LowerDYNAMIC_STACKALLOC()

static SDValue LowerDYNAMIC_STACKALLOC ( SDValue  Op,
SelectionDAG DAG,
const SparcSubtarget Subtarget 
)
static

◆ LowerF128_FPEXTEND()

static SDValue LowerF128_FPEXTEND ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI 
)
static

◆ LowerF128_FPROUND()

static SDValue LowerF128_FPROUND ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI 
)
static

◆ LowerF128Load()

static SDValue LowerF128Load ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerF128Store()

static SDValue LowerF128Store ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerF64Op()

static SDValue LowerF64Op ( SDValue  SrcReg64,
const SDLoc dl,
SelectionDAG DAG,
unsigned  opcode 
)
static

◆ LowerFNEGorFABS()

static SDValue LowerFNEGorFABS ( SDValue  Op,
SelectionDAG DAG,
bool  isV9 
)
static

◆ LowerFP_TO_SINT()

static SDValue LowerFP_TO_SINT ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad 
)
static

◆ LowerFP_TO_UINT()

static SDValue LowerFP_TO_UINT ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad 
)
static

◆ LowerFRAMEADDR()

static SDValue LowerFRAMEADDR ( SDValue  Op,
SelectionDAG DAG,
const SparcSubtarget Subtarget 
)
static

Definition at line 2824 of file SparcISelLowering.cpp.

References getFRAMEADDR().

Referenced by llvm::SparcTargetLowering::LowerOperation().

◆ LowerLOAD()

static SDValue LowerLOAD ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerRETURNADDR()

static SDValue LowerRETURNADDR ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
const SparcSubtarget Subtarget 
)
static

◆ LowerSELECT_CC()

static SDValue LowerSELECT_CC ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad,
bool  isV9,
bool  is64Bit 
)
static

◆ LowerSINT_TO_FP()

static SDValue LowerSINT_TO_FP ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad 
)
static

◆ LowerSTORE()

static SDValue LowerSTORE ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ LowerUINT_TO_FP()

static SDValue LowerUINT_TO_FP ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI,
bool  hasHardQuad 
)
static

◆ LowerUMULO_SMULO()

static SDValue LowerUMULO_SMULO ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI 
)
static

◆ LowerVAARG()

static SDValue LowerVAARG ( SDValue  Op,
SelectionDAG DAG 
)
static

Definition at line 2695 of file SparcISelLowering.cpp.

Referenced by llvm::SparcTargetLowering::LowerOperation().

◆ LowerVASTART()

static SDValue LowerVASTART ( SDValue  Op,
SelectionDAG DAG,
const SparcTargetLowering TLI 
)
static

◆ RetCC_Sparc64_Full()

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

Definition at line 206 of file SparcISelLowering.cpp.

References Analyze_CC_Sparc64_Full().

◆ RetCC_Sparc64_Half()

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

Definition at line 213 of file SparcISelLowering.cpp.

References Analyze_CC_Sparc64_Half().

◆ toCallerWindow()

static unsigned toCallerWindow ( unsigned  Reg)
static