LLVM API Documentation
#include "SystemZISelLowering.h"
#include "SystemZCallingConv.h"
#include "SystemZConstantPoolValue.h"
#include "SystemZMachineFunctionInfo.h"
#include "SystemZTargetMachine.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include <cctype>
#include "SystemZGenCallingConv.inc"
Go to the source code of this file.
case ISD::SET##X: return SystemZ::CCMASK_CMP_##X; \ case ISD::SETO##X: return SystemZ::CCMASK_CMP_##X; \ case ISD::SETU##X: return SystemZ::CCMASK_CMP_UO | SystemZ::CCMASK_CMP_##X
Referenced by CCMaskForCondCode().
#define DEBUG_TYPE "systemz-lower" |
Definition at line 27 of file SystemZISelLowering.cpp.
#define OPCODE | ( | NAME | ) | case SystemZISD::NAME: return "SystemZISD::" #NAME |
Referenced by llvm::SystemZTargetLowering::getTargetNodeName().
static void adjustForFNeg | ( | Comparison & | C | ) | [static] |
Definition at line 1313 of file SystemZISelLowering.cpp.
References llvm::dyn_cast(), llvm::ISD::FNEG, llvm::SDNode::getOpcode(), I, N, and reverseCCMask().
Referenced by getCmp().
static void adjustForLTGFR | ( | Comparison & | C | ) | [static] |
Definition at line 1333 of file SystemZISelLowering.cpp.
References llvm::ISD::Constant, llvm::dyn_cast(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), I, llvm::MVT::i32, llvm::MVT::i64, N, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND_INREG, llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
Referenced by getCmp().
static void adjustForSubtraction | ( | SelectionDAG & | DAG, |
Comparison & | C | ||
) | [static] |
Definition at line 1293 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_NE, llvm::SelectionDAG::getConstant(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDNode::getValueType(), I, N, and llvm::ISD::SUB.
Referenced by getCmp().
static void adjustForTestUnderMask | ( | SelectionDAG & | DAG, |
Comparison & | C | ||
) | [static] |
Definition at line 1489 of file SystemZISelLowering.cpp.
References llvm::ISD::AND, llvm::SystemZICMP::Any, llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LE, llvm::SystemZ::CCMASK_CMP_NE, llvm::SystemZ::CCMASK_TM, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), getTestUnderMaskCond(), llvm::ConstantSDNode::getZExtValue(), llvm::MVT::i64, isSimpleShift(), llvm::ISD::SHL, llvm::SystemZICMP::SignedOnly, llvm::ISD::SRL, llvm::SystemZISD::TM, and llvm::SystemZICMP::UnsignedOnly.
Referenced by getCmp().
static void adjustICmpTruncate | ( | SelectionDAG & | DAG, |
Comparison & | C | ||
) | [static] |
Definition at line 1358 of file SystemZISelLowering.cpp.
References llvm::ISD::Constant, llvm::SelectionDAG::getConstant(), llvm::ISD::LOAD, llvm::ISD::SEXTLOAD, llvm::SystemZICMP::SignedOnly, llvm::ISD::TRUNCATE, llvm::SystemZICMP::UnsignedOnly, and llvm::ISD::ZEXTLOAD.
Referenced by getCmp().
static void adjustSubwordCmp | ( | SelectionDAG & | DAG, |
Comparison & | C | ||
) | [static] |
Definition at line 1132 of file SystemZISelLowering.cpp.
References llvm::SystemZICMP::Any, llvm::SystemZ::CCMASK_CMP_GE, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LT, llvm::ISD::Constant, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getExtLoad(), llvm::MVT::i32, llvm::SPII::Load, llvm::ISD::LOAD, llvm::ISD::SEXTLOAD, llvm::SystemZICMP::SignedOnly, llvm::SystemZICMP::UnsignedOnly, and llvm::ISD::ZEXTLOAD.
Referenced by getCmp().
static void adjustZeroCmp | ( | SelectionDAG & | DAG, |
Comparison & | C | ||
) | [static] |
Definition at line 1112 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_GE, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LE, llvm::SystemZ::CCMASK_CMP_LT, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), and llvm::SystemZICMP::UnsignedOnly.
Referenced by getCmp().
static bool canUseSiblingCall | ( | CCState | ArgCCInfo, |
SmallVectorImpl< CCValAssign > & | ArgLocs | ||
) | [static] |
Definition at line 785 of file SystemZISelLowering.cpp.
References llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocReg(), I, llvm::CCValAssign::Indirect, llvm::CCValAssign::isRegLoc(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::SystemZTargetLowering::LowerCall().
static unsigned CCMaskForCondCode | ( | ISD::CondCode | CC | ) | [static] |
Definition at line 1020 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_CMP_O, llvm::SystemZ::CCMASK_CMP_UO, CONV, EQ, llvm::AArch64CC::GE, llvm::AArch64CC::GT, llvm::AArch64CC::LE, llvm_unreachable, llvm::AArch64CC::LT, llvm::AArch64CC::NE, llvm::ISD::SETO, and llvm::ISD::SETUO.
Referenced by getCmp().
static SDValue convertLocVTToValVT | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
CCValAssign & | VA, | ||
SDValue | Chain, | ||
SDValue | Value | ||
) | [static] |
Definition at line 626 of file SystemZISelLowering.cpp.
References llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::CCValAssign::Full, llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::CCValAssign::Indirect, llvm::CCValAssign::isExtInLoc(), llvm::CCValAssign::SExt, llvm::ISD::TRUNCATE, and llvm::CCValAssign::ZExt.
Referenced by llvm::SystemZTargetLowering::LowerCall(), and llvm::SystemZTargetLowering::LowerFormalArguments().
static SDValue convertValVTToLocVT | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
CCValAssign & | VA, | ||
SDValue | Value | ||
) | [static] |
Definition at line 651 of file SystemZISelLowering.cpp.
References llvm::CCValAssign::AExt, llvm::ISD::ANY_EXTEND, llvm::CCValAssign::Full, llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getNode(), llvm_unreachable, llvm::CCValAssign::SExt, llvm::ISD::SIGN_EXTEND, llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.
Referenced by llvm::SystemZTargetLowering::LowerCall(), and llvm::SystemZTargetLowering::LowerReturn().
static MachineOperand earlyUseOperand | ( | MachineOperand | Op | ) | [static] |
Definition at line 77 of file SystemZISelLowering.cpp.
References llvm::MachineOperand::isReg(), and llvm::MachineOperand::setIsKill().
static MachineBasicBlock* emitBlockAfter | ( | MachineBasicBlock * | MBB | ) | [static] |
Definition at line 2567 of file SystemZISelLowering.cpp.
References llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineBasicBlock::getParent(), and llvm::MachineFunction::insert().
Referenced by splitBlockAfter(), and splitBlockBefore().
static SDValue emitCmp | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
Comparison & | C | ||
) | [static] |
Definition at line 1613 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_TM_MIXED_MSB_0, llvm::SystemZ::CCMASK_TM_MIXED_MSB_1, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::Glue, llvm::MVT::i32, llvm::SystemZISD::ICMP, and llvm::SystemZISD::TM.
static SDValue emitSETCC | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
SDValue | Glue, | ||
unsigned | CCValid, | ||
unsigned | CCMask | ||
) | [static] |
Definition at line 1660 of file SystemZISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::SelectionDAG::getConstant(), getIPMConversion(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, llvm::SystemZISD::IPM, llvm::ISD::SRL, and llvm::ISD::XOR.
static unsigned forceReg | ( | MachineInstr * | MI, |
MachineOperand & | Base, | ||
const SystemZInstrInfo * | TII | ||
) | [static] |
Definition at line 2595 of file SystemZISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), and llvm::MachineOperand::isReg().
static SDValue getAbsolute | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
SDValue | Op, | ||
bool | IsNegative | ||
) | [static] |
Definition at line 1722 of file SystemZISelLowering.cpp.
References llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::SystemZISD::IABS, and llvm::ISD::SUB.
static Comparison getCmp | ( | SelectionDAG & | DAG, |
SDValue | CmpOp0, | ||
SDValue | CmpOp1, | ||
ISD::CondCode | Cond | ||
) | [static] |
Definition at line 1571 of file SystemZISelLowering.cpp.
References adjustForFNeg(), adjustForLTGFR(), adjustForSubtraction(), adjustForTestUnderMask(), adjustICmpTruncate(), adjustSubwordCmp(), adjustZeroCmp(), llvm::SystemZICMP::Any, llvm::CallingConv::C, llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_NE, llvm::SystemZ::CCMASK_CMP_UO, llvm::SystemZ::CCMASK_FCMP, llvm::SystemZ::CCMASK_ICMP, CCMaskForCondCode(), llvm::SystemZISD::FCMP, llvm::SystemZISD::ICMP, reverseCCMask(), shouldSwapCmpOperands(), llvm::SelectionDAG::SignBitIsZero(), llvm::SystemZICMP::SignedOnly, std::swap(), and llvm::SystemZICMP::UnsignedOnly.
static IPMConversion getIPMConversion | ( | unsigned | CCValid, |
unsigned | CCMask | ||
) | [static] |
Definition at line 1046 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_0, llvm::SystemZ::CCMASK_1, llvm::SystemZ::CCMASK_2, llvm::SystemZ::CCMASK_3, llvm::SystemZ::IPM_CC, and llvm_unreachable.
Referenced by emitSETCC().
static unsigned getTestUnderMaskCond | ( | unsigned | BitSize, |
unsigned | CCMask, | ||
uint64_t | Mask, | ||
uint64_t | CmpVal, | ||
unsigned | ICmpType | ||
) | [static] |
Definition at line 1397 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_ANY, llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_GE, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LE, llvm::SystemZ::CCMASK_CMP_LT, llvm::SystemZ::CCMASK_CMP_NE, llvm::SystemZ::CCMASK_TM_ALL_0, llvm::SystemZ::CCMASK_TM_ALL_1, llvm::SystemZ::CCMASK_TM_MIXED_MSB_0, llvm::SystemZ::CCMASK_TM_MIXED_MSB_1, llvm::SystemZ::CCMASK_TM_MSB_0, llvm::SystemZ::CCMASK_TM_MSB_1, llvm::SystemZ::CCMASK_TM_SOME_0, llvm::SystemZ::CCMASK_TM_SOME_1, llvm::countLeadingZeros(), llvm::countTrailingZeros(), llvm::SystemZ::isImmHH(), llvm::SystemZ::isImmHL(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), and llvm::SystemZICMP::SignedOnly.
Referenced by adjustForTestUnderMask().
Definition at line 64 of file SystemZISelLowering.cpp.
References llvm::EVT::getSimpleVT(), llvm::MVT::i32, llvm::MVT::i64, llvm_unreachable, and llvm::MVT::SimpleTy.
Referenced by lowerGR128Binary().
static bool isAbsolute | ( | SDValue | CmpOp, |
SDValue | Pos, | ||
SDValue | Neg | ||
) | [static] |
Definition at line 1711 of file SystemZISelLowering.cpp.
References llvm::ISD::Constant, llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::ISD::SIGN_EXTEND, and llvm::ISD::SUB.
static bool isNaturalMemoryOperand | ( | SDValue | Op, |
unsigned | ICmpType | ||
) | [static] |
Definition at line 1202 of file SystemZISelLowering.cpp.
References llvm::dyn_cast(), llvm::SDValue::getNode(), llvm::MVT::i8, llvm::SPII::Load, llvm::ISD::NON_EXTLOAD, llvm::ISD::SEXTLOAD, llvm::SystemZICMP::SignedOnly, llvm::SystemZICMP::UnsignedOnly, and llvm::ISD::ZEXTLOAD.
Referenced by shouldSwapCmpOperands().
static bool isSimpleShift | ( | SDValue | N, |
unsigned & | ShiftVal | ||
) | [static] |
Definition at line 1378 of file SystemZISelLowering.cpp.
References llvm::dyn_cast(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), and llvm::ConstantSDNode::getZExtValue().
Referenced by adjustForTestUnderMask().
static void lowerGR128Binary | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
EVT | VT, | ||
unsigned | Extend, | ||
unsigned | Opcode, | ||
SDValue | Op0, | ||
SDValue | Op1, | ||
SDValue & | Even, | ||
SDValue & | Odd | ||
) | [static] |
Definition at line 1645 of file SystemZISelLowering.cpp.
References llvm::SystemZ::even128(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getTargetExtractSubreg(), is32Bit(), llvm::SystemZ::odd128(), and llvm::MVT::Untyped.
static void lowerMUL_LOHI32 | ( | SelectionDAG & | DAG, |
SDLoc | DL, | ||
unsigned | Extend, | ||
SDValue | Op0, | ||
SDValue | Op1, | ||
SDValue & | Hi, | ||
SDValue & | Lo | ||
) | [static] |
Definition at line 1629 of file SystemZISelLowering.cpp.
References llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::MUL, llvm::ISD::SRL, and llvm::ISD::TRUNCATE.
static std::pair<unsigned, const TargetRegisterClass *> parseRegisterNumber | ( | const std::string & | Constraint, |
const TargetRegisterClass * | RC, | ||
const unsigned * | Map | ||
) | [static] |
Definition at line 487 of file SystemZISelLowering.cpp.
References llvm::LibFunc::atoi, and llvm::LibFunc::isdigit.
Referenced by llvm::SystemZTargetLowering::getRegForInlineAsmConstraint().
static unsigned reverseCCMask | ( | unsigned | CCMask | ) | [static] |
Definition at line 1283 of file SystemZISelLowering.cpp.
References llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LT, and llvm::SystemZ::CCMASK_CMP_UO.
Referenced by adjustForFNeg(), and getCmp().
static bool shouldSwapCmpOperands | ( | const Comparison & | C | ) | [static] |
Definition at line 1224 of file SystemZISelLowering.cpp.
References llvm::ISD::AND, llvm::ISD::Constant, llvm::dyn_cast(), llvm::MVT::f128, llvm::isInt< 16 >(), isNaturalMemoryOperand(), llvm::isUInt< 16 >(), llvm::ISD::SIGN_EXTEND, llvm::SystemZICMP::SignedOnly, llvm::SystemZICMP::UnsignedOnly, and llvm::ISD::ZERO_EXTEND.
Referenced by getCmp().
static MachineBasicBlock* splitBlockAfter | ( | MachineInstr * | MI, |
MachineBasicBlock * | MBB | ||
) | [static] |
Definition at line 2576 of file SystemZISelLowering.cpp.
References llvm::MachineBasicBlock::begin(), emitBlockAfter(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::splice(), and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
static MachineBasicBlock* splitBlockBefore | ( | MachineInstr * | MI, |
MachineBasicBlock * | MBB | ||
) | [static] |
Definition at line 2586 of file SystemZISelLowering.cpp.
References llvm::MachineBasicBlock::begin(), emitBlockAfter(), llvm::MachineBasicBlock::end(), llvm::AArch64CC::MI, llvm::MachineBasicBlock::splice(), and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().