LLVM 20.0.0git
|
#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.
|
static |
Definition at line 107 of file SparcISelLowering.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateStack(), assert(), llvm::CCValAssign::getMem(), llvm::CCValAssign::getReg(), llvm::MVT::getSizeInBits(), llvm::Offset, and llvm::size().
Referenced by CC_Sparc64_Full(), and RetCC_Sparc64_Full().
|
static |
Definition at line 157 of file SparcISelLowering.cpp.
References llvm::CCState::addLoc(), llvm::CCValAssign::AExt, llvm::CCState::AllocateStack(), assert(), llvm::CCValAssign::getCustomReg(), llvm::CCValAssign::getMem(), llvm::CCValAssign::getReg(), llvm::MVT::getSizeInBits(), and llvm::Offset.
Referenced by CC_Sparc64_Half(), and RetCC_Sparc64_Half().
|
static |
Definition at line 194 of file SparcISelLowering.cpp.
References Analyze_CC_Sparc64_Full().
|
static |
Definition at line 201 of file SparcISelLowering.cpp.
References Analyze_CC_Sparc64_Half().
|
static |
Definition at line 83 of file SparcISelLowering.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), and llvm::CCValAssign::getCustomReg().
|
static |
Definition at line 57 of file SparcISelLowering.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), llvm::CCState::AllocateStack(), llvm::CCValAssign::getCustomMem(), and llvm::CCValAssign::getCustomReg().
|
static |
Definition at line 44 of file SparcISelLowering.cpp.
References llvm::CCState::addLoc(), assert(), llvm::CCValAssign::getCustomMem(), and llvm::ISD::ArgFlagsTy::isSRet().
|
static |
Definition at line 750 of file SparcISelLowering.cpp.
References F, and llvm::MachineFunction::getFunction().
Referenced by llvm::SparcTargetLowering::LowerCall_32(), and llvm::SparcTargetLowering::LowerCall_64().
|
static |
Definition at line 1179 of file SparcISelLowering.cpp.
References assert(), llvm::CCValAssign::BCvt, llvm::CCValAssign::getCustomReg(), llvm::CCValAssign::getMem(), llvm::CCValAssign::getReg(), and llvm::Offset.
Referenced by llvm::SparcTargetLowering::LowerCall_64().
|
static |
FPCondCCodeToFCC - Convert a DAG floatingp oint condition code to a SPARC FCC condition.
Definition at line 1556 of file SparcISelLowering.cpp.
References CC, llvm::SPCC::FCC_E, llvm::SPCC::FCC_G, llvm::SPCC::FCC_GE, llvm::SPCC::FCC_L, llvm::SPCC::FCC_LE, llvm::SPCC::FCC_LG, llvm::SPCC::FCC_NE, llvm::SPCC::FCC_O, llvm::SPCC::FCC_U, llvm::SPCC::FCC_UE, llvm::SPCC::FCC_UG, llvm::SPCC::FCC_UGE, llvm::SPCC::FCC_UL, llvm::SPCC::FCC_ULE, llvm_unreachable, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETO, llvm::ISD::SETOEQ, llvm::ISD::SETOGE, llvm::ISD::SETOGT, llvm::ISD::SETOLE, llvm::ISD::SETOLT, llvm::ISD::SETONE, llvm::ISD::SETUEQ, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SETUNE, and llvm::ISD::SETUO.
Referenced by LowerBR_CC(), and LowerSELECT_CC().
|
static |
Definition at line 2828 of file SparcISelLowering.cpp.
References llvm::SPISD::FLUSHW, llvm::SelectionDAG::getEntryNode(), and llvm::SelectionDAG::getNode().
Referenced by getFRAMEADDR().
|
static |
Definition at line 2835 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getEntryNode(), getFLUSHW(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SparcSubtarget::getStackPointerBias(), llvm::SparcSubtarget::is64Bit(), llvm::Offset, Ptr, and llvm::MachineFrameInfo::setFrameAddressIsTaken().
Referenced by LowerFRAMEADDR(), and LowerRETURNADDR().
|
static |
Definition at line 765 of file SparcISelLowering.cpp.
References G, llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::GlobalValue::getParent(), and llvm::Function::hasFnAttribute().
Referenced by llvm::SparcTargetLowering::LowerCall_32(), and llvm::SparcTargetLowering::LowerCall_64().
|
static |
IntCondCCodeToICC - Convert a DAG integer condition code to a SPARC ICC condition.
Definition at line 1538 of file SparcISelLowering.cpp.
References CC, llvm::SPCC::ICC_CC, llvm::SPCC::ICC_CS, llvm::SPCC::ICC_E, llvm::SPCC::ICC_G, llvm::SPCC::ICC_GE, llvm::SPCC::ICC_GU, llvm::SPCC::ICC_L, llvm::SPCC::ICC_LE, llvm::SPCC::ICC_LEU, llvm::SPCC::ICC_NE, llvm_unreachable, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, and llvm::ISD::SETULT.
|
static |
intCondCCodeToRcond - Convert a DAG integer condition code to a SPARC rcond condition.
Definition at line 1517 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 LowerBR_CC(), and LowerSELECT_CC().
|
static |
Definition at line 734 of file SparcISelLowering.cpp.
References llvm::any_of(), and TRI.
Referenced by llvm::SparcTargetLowering::LowerCall_32(), and llvm::SparcTargetLowering::LowerCall_64().
|
static |
Definition at line 2070 of file SparcISelLowering.cpp.
References CC, llvm::SPISD::CMPFCC, llvm::SPISD::CMPFCC_V9, llvm::SPISD::CMPICC, llvm::SDValue::getOperand(), llvm::isNullConstant(), llvm::isOneConstant(), LHS, RHS, llvm::SPISD::SELECT_FCC, llvm::SPISD::SELECT_ICC, llvm::SPISD::SELECT_XCC, and llvm::ISD::SETNE.
Referenced by LowerBR_CC(), and LowerSELECT_CC().
|
static |
Definition at line 3101 of file SparcISelLowering.cpp.
References llvm::isStrongerThanMonotonic().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2614 of file SparcISelLowering.cpp.
References assert(), llvm::SPISD::BPICC, llvm::SPISD::BPXCC, llvm::SPISD::BR_REG, llvm::SPISD::BRFCC, llvm::SPISD::BRFCC_V9, llvm::SPISD::BRICC, CC, llvm::SPISD::CMPFCC, llvm::SPISD::CMPFCC_V9, llvm::SPISD::CMPICC, FPCondCCodeToFCC(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), IntCondCCodeToICC(), intCondCCodeToRcond(), is64Bit(), llvm::isNullConstant(), llvm::ISD::isUnsignedIntSetCC(), LHS, LookThroughSetCC(), llvm::SparcTargetLowering::LowerF128Compare(), and RHS.
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2763 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SparcSubtarget::getFrameLowering(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMergeValues(), llvm::MachineFunction::getName(), llvm::SelectionDAG::getNode(), llvm::TargetFrameLowering::getStackAlign(), llvm::SparcSubtarget::getStackPointerBias(), llvm::SDValue::getValue(), llvm::SparcSubtarget::is64Bit(), llvm::report_fatal_error(), Size, and llvm::ISD::SUB.
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2484 of file SparcISelLowering.cpp.
References llvm::TargetLoweringBase::getLibcallName(), llvm_unreachable, and llvm::SparcTargetLowering::LowerF128Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2500 of file SparcISelLowering.cpp.
References llvm::TargetLoweringBase::getLibcallName(), llvm_unreachable, and llvm::SparcTargetLowering::LowerF128Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2946 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, assert(), llvm::commonAlignment(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMergeValues(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::LoadSDNode::getOffset(), llvm::MemSDNode::getOriginalAlign(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::MachinePointerInfo::getWithOffset(), llvm::SDValue::isUndef(), and llvm::ISD::TokenFactor.
Referenced by LowerLOAD().
|
static |
Definition at line 2999 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, assert(), llvm::commonAlignment(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getNode(), llvm::StoreSDNode::getOffset(), llvm::MemSDNode::getOriginalAlign(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetConstant(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), llvm::MachinePointerInfo::getWithOffset(), llvm::SDValue::isUndef(), and llvm::ISD::TokenFactor.
Referenced by LowerSTORE().
|
static |
Definition at line 2912 of file SparcISelLowering.cpp.
References assert(), llvm::ISD::FABS, llvm::ISD::FNEG, llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getTargetExtractSubreg(), llvm::SelectionDAG::getTargetInsertSubreg(), llvm::SDValue::getValueType(), and llvm::DataLayout::isLittleEndian().
Referenced by LowerFNEGorFABS().
|
static |
Definition at line 3058 of file SparcISelLowering.cpp.
References assert(), llvm::ISD::FABS, llvm::ISD::FNEG, llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getTargetExtractSubreg(), llvm::SelectionDAG::getTargetInsertSubreg(), llvm::DataLayout::isLittleEndian(), and LowerF64Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2517 of file SparcISelLowering.cpp.
References assert(), llvm::ISD::BITCAST, llvm::SPISD::FTOI, llvm::SPISD::FTOX, llvm::TargetLoweringBase::getLibcallName(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::SparcTargetLowering::LowerF128Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2574 of file SparcISelLowering.cpp.
References assert(), llvm::TargetLoweringBase::getLibcallName(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::SparcTargetLowering::LowerF128Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2868 of file SparcISelLowering.cpp.
References getFRAMEADDR().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2987 of file SparcISelLowering.cpp.
References llvm::MemSDNode::getMemoryVT(), and LowerF128Load().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2877 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::MachineFunction::addLiveIn(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), getFRAMEADDR(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::SparcSubtarget::is64Bit(), llvm::Offset, Ptr, llvm::MachineFrameInfo::setReturnAddressIsTaken(), and llvm::TargetLowering::verifyReturnAddressArgumentIsConstant().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2665 of file SparcISelLowering.cpp.
References assert(), CC, llvm::SPISD::CMPFCC, llvm::SPISD::CMPFCC_V9, llvm::SPISD::CMPICC, FPCondCCodeToFCC(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), IntCondCCodeToICC(), intCondCCodeToRcond(), is64Bit(), llvm::isNullConstant(), llvm::ISD::isUnsignedIntSetCC(), LHS, LookThroughSetCC(), llvm::SparcTargetLowering::LowerF128Compare(), RHS, llvm::SPISD::SELECT_FCC, llvm::SPISD::SELECT_ICC, llvm::SPISD::SELECT_REG, and llvm::SPISD::SELECT_XCC.
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2546 of file SparcISelLowering.cpp.
References assert(), llvm::ISD::BITCAST, llvm::TargetLoweringBase::getLibcallName(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::isTypeLegal(), llvm::SPISD::ITOF, llvm::SparcTargetLowering::LowerF128Op(), and llvm::SPISD::XTOF.
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 3035 of file SparcISelLowering.cpp.
References llvm::ISD::BITCAST, llvm::MemSDNode::getAAInfo(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::MachineMemOperand::getFlags(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), llvm::MemSDNode::getOriginalAlign(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getStore(), llvm::StoreSDNode::getValue(), and LowerF128Store().
|
static |
Definition at line 2595 of file SparcISelLowering.cpp.
References assert(), llvm::TargetLoweringBase::getLibcallName(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::SparcTargetLowering::LowerF128Op().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2739 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, DL, llvm::EVT::getFixedSizeInBits(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::SDValue::getValue(), and llvm::SDValue::getValueType().
Referenced by llvm::SparcTargetLowering::LowerOperation().
|
static |
Definition at line 2719 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, DL, llvm::SelectionDAG::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getStore(), llvm::SparcMachineFunctionInfo::getVarArgsFrameOffset(), llvm::Offset, and llvm::MachineFrameInfo::setFrameAddressIsTaken().
|
static |
Definition at line 208 of file SparcISelLowering.cpp.
References Analyze_CC_Sparc64_Full().
|
static |
Definition at line 215 of file SparcISelLowering.cpp.
References Analyze_CC_Sparc64_Half().
Definition at line 227 of file SparcISelLowering.cpp.
Referenced by llvm::SparcTargetLowering::LowerCall_32(), and llvm::SparcTargetLowering::LowerCall_64().