LLVM 20.0.0git
Functions
SparcISelLowering.cpp File Reference
#include "SparcISelLowering.h"
#include "MCTargetDesc/SparcMCExpr.h"
#include "MCTargetDesc/SparcMCTargetDesc.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/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "SparcGenCallingConv.inc"

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 isAnyArgRegReserved (const SparcRegisterInfo *TRI, const MachineFunction &MF)
 
static void emitReservedArgRegCallError (const MachineFunction &MF)
 
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.
 
static SPCC::CondCodes IntCondCCodeToICC (ISD::CondCode CC)
 IntCondCCodeToICC - Convert a DAG integer condition code to a SPARC ICC condition.
 
static SPCC::CondCodes FPCondCCodeToFCC (ISD::CondCode CC)
 FPCondCCodeToFCC - Convert a DAG floatingp oint condition code to a SPARC FCC condition.
 
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, bool is64Bit)
 
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 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 194 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 201 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

◆ emitReservedArgRegCallError()

static void emitReservedArgRegCallError ( const MachineFunction MF)
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

◆ isAnyArgRegReserved()

static bool isAnyArgRegReserved ( const SparcRegisterInfo TRI,
const MachineFunction MF 
)
static

◆ LookThroughSetCC()

static void LookThroughSetCC ( SDValue LHS,
SDValue RHS,
ISD::CondCode  CC,
unsigned SPCC 
)
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,
bool  is64Bit 
)
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 2868 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

◆ LowerVAARG()

static SDValue LowerVAARG ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ 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 208 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 215 of file SparcISelLowering.cpp.

References Analyze_CC_Sparc64_Half().

◆ toCallerWindow()

static unsigned toCallerWindow ( unsigned  Reg)
static