LLVM  8.0.0svn
Namespaces | Functions
X86FastISel.cpp File Reference
#include "X86.h"
#include "X86CallingConv.h"
#include "X86InstrBuilder.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
#include "X86RegisterInfo.h"
#include "X86Subtarget.h"
#include "X86TargetMachine.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/CodeGen/FastISel.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Operator.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetOptions.h"
#include "X86GenFastISel.inc"
#include "X86GenCallingConv.inc"
Include dependency graph for X86FastISel.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Functions

static std::pair< unsigned, boolgetX86SSEConditionCode (CmpInst::Predicate Predicate)
 
static unsigned X86ChooseCmpOpcode (EVT VT, const X86Subtarget *Subtarget)
 
static unsigned X86ChooseCmpImmediateOpcode (EVT VT, const ConstantInt *RHSC)
 If we have a comparison with RHS as the RHS of the comparison, return an opcode that works for the compare (e.g. More...
 
static unsigned computeBytesPoppedByCalleeForSRet (const X86Subtarget *Subtarget, CallingConv::ID CC, ImmutableCallSite *CS)
 

Function Documentation

◆ computeBytesPoppedByCalleeForSRet()

static unsigned computeBytesPoppedByCalleeForSRet ( const X86Subtarget Subtarget,
CallingConv::ID  CC,
ImmutableCallSite CS 
)
static

Definition at line 3175 of file X86FastISel.cpp.

References llvm::addConstantPoolReference(), llvm::addDirectMem(), llvm::addFrameReference(), llvm::addFullAddress(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstr::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), llvm::MachineInstrBuilder::addSym(), llvm::CCValAssign::AExt, llvm::CCValAssign::AExtUpper, llvm::AArch64CC::AL, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::CCState::AllocateStack(), llvm::CCState::AnalyzeCallResult(), llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_empty(), assert(), llvm::X86AddressMode::Base, llvm::X86AddressMode::BaseType, llvm::CCValAssign::BCvt, llvm::ISD::BITCAST, llvm::EVT::bitsGT(), llvm::EVT::bitsLT(), llvm::BuildMI(), llvm::CallingConv::C, C, Callee, llvm::constrainOperandRegClass(), llvm::X86AddressMode::Disp, llvm::CallBase< InstTy >::doesNoCfCheck(), llvm::dyn_cast(), E, llvm::N86::EBX, llvm::MachineInstr::eraseFromParent(), llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::f80, llvm::CallingConv::Fast, llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::CCValAssign::FPExt, llvm::CCValAssign::Full, llvm::LoadInst::getAlignment(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::CallBase< InstTy >::getCalledFunction(), llvm::MachinePointerInfo::getConstantPool(), llvm::Value::getContext(), llvm::MachineInstr::getDesc(), llvm::X86AddressMode::getFullAddress(), llvm::Type::getInt32Ty(), llvm::getKillRegState(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::MCInstrDesc::getNumDefs(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::LoadInst::getPointerOperand(), llvm::MachineOperand::getReg(), llvm::MVT::getScalarSizeInBits(), llvm::ConstantExpr::getSExt(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::MachinePointerInfo::getStack(), llvm::X86RegisterInfo::getStackRegister(), llvm::MVT::getStoreSize(), llvm::X86Subtarget::getTargetTriple(), llvm::Value::getType(), llvm::CCValAssign::getValNo(), llvm::CCValAssign::getValVT(), llvm::ConstantExpr::getZExt(), llvm::ConstantInt::getZExtValue(), llvm::CallingConv::GHC, llvm::X86AddressMode::GV, llvm::CallBase< InstTy >::hasFnAttr(), llvm::CallingConv::HiPE, I, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::RegState::Implicit, llvm::MCInstrDesc::ImplicitDefs, llvm::X86AddressMode::IndexReg, llvm::CCValAssign::Indirect, llvm::MipsISD::Ins, llvm::MVT::is128BitVector(), llvm::MVT::is256BitVector(), llvm::MVT::is512BitVector(), llvm::X86Subtarget::is64Bit(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::X86::isCalleePop(), llvm::MachineOperand::isDef(), llvm::isInt< 32 >(), llvm::MVT::isInteger(), llvm::CCValAssign::isMemLoc(), llvm::Constant::isNullValue(), llvm::Triple::isOSMSVCRT(), llvm::MachineOperand::isReg(), llvm::CCValAssign::isRegLoc(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::EVT::isSimple(), llvm::AllocaInst::isStaticAlloca(), llvm::X86Subtarget::isTargetMCU(), llvm::isUInt< 32 >(), llvm::MVT::isVector(), llvm::CodeModel::Large, LLVM_FALLTHROUGH, llvm_unreachable, llvm::SPII::Load, MI, llvm::X86II::MO_DLLIMPORT, llvm::X86II::MO_GOTOFF, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_PIC_BASE_OFFSET, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::paramHasAttr(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::X86AddressMode::Reg, Reg, llvm::X86AddressMode::RegBase, llvm::report_fatal_error(), Result, llvm::MipsISD::Ret, llvm::MCID::Select, llvm::MachineOperand::setReg(), llvm::CCValAssign::SExt, llvm::CCValAssign::SExtUpper, llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, Size, llvm::SmallVectorBase::size(), llvm::CodeModel::Small, llvm::Reloc::Static, llvm::SPII::Store, llvm::CallingConv::Swift, llvm::ARMBuildAttrs::Symbol, TII, llvm::SystemZISD::TM, TRI, llvm::CCValAssign::VExt, llvm::CallingConv::WebKit_JS, llvm::CallingConv::Win64, llvm::CallingConv::X86_64_SysV, llvm::CallingConv::X86_FastCall, llvm::CallingConv::X86_StdCall, llvm::CallingConv::X86_ThisCall, llvm::MVT::x86mmx, X86SelectAddress(), llvm::ISD::ZERO_EXTEND, llvm::CCValAssign::ZExt, and llvm::CCValAssign::ZExtUpper.

◆ getX86SSEConditionCode()

static std::pair<unsigned, bool> getX86SSEConditionCode ( CmpInst::Predicate  Predicate)
static

◆ X86ChooseCmpImmediateOpcode()

static unsigned X86ChooseCmpImmediateOpcode ( EVT  VT,
const ConstantInt RHSC 
)
static

If we have a comparison with RHS as the RHS of the comparison, return an opcode that works for the compare (e.g.

CMP32ri) otherwise return 0.

Definition at line 1377 of file X86FastISel.cpp.

References llvm::ISD::ADD, llvm::addDirectMem(), llvm::addFullAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMetadata(), llvm::MachineInstrBuilder::addReg(), llvm::AArch64CC::AL, Arg, llvm::Function::args(), assert(), llvm::BuildMI(), llvm::CallingConv::C, Callee, llvm::X86::COND_NE, llvm::X86ISD::DEC, llvm::Depth, llvm::X86AddressMode::Disp, llvm::dyn_cast(), llvm::N86::EAX, llvm::N86::ECX, llvm::N86::EDI, llvm::N86::EDX, llvm::N86::ESI, F(), llvm::MVT::f32, llvm::MVT::f64, llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::DbgDeclareInst::getAddress(), llvm::CallBase< InstTy >::getArgOperand(), llvm::CallBase< InstTy >::getCalledFunction(), llvm::Function::getCallingConv(), llvm::X86::getCMovFromCond(), llvm::X86::GetCondBranchFromCond(), llvm::BranchInst::getCondition(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::MemIntrinsicBase< Derived >::getDestAddressSpace(), llvm::DbgVariableIntrinsic::getExpression(), llvm::MachineFunction::getFrameInfo(), llvm::IntrinsicInst::getIntrinsicID(), llvm::CmpInst::getInversePredicate(), llvm::getKillRegState(), llvm::MemIntrinsicBase< Derived >::getLength(), llvm::TargetMachine::getMCAsmInfo(), llvm::Constant::getNullValue(), llvm::CallBase< InstTy >::getNumArgOperands(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::CallBase< InstTy >::getOperand(), llvm::Instruction::getParent(), llvm::X86RegisterInfo::getPtrSizedFrameRegister(), llvm::MemIntrinsicBase< Derived >::getRawDest(), llvm::MemTransferBase< BaseCL >::getRawSource(), llvm::TargetRegisterInfo::getRegSizeInBits(), llvm::Function::getReturnType(), llvm::Type::getScalarSizeInBits(), llvm::X86::getSETFromCond(), llvm::ConstantInt::getSExtValue(), llvm::EVT::getSimpleVT(), llvm::MVT::getSizeInBits(), llvm::MemTransferBase< BaseCL >::getSourceAddressSpace(), llvm::BranchInst::getSuccessor(), llvm::MachineFunction::getTarget(), llvm::Value::getType(), llvm::DbgVariableIntrinsic::getVariable(), llvm::X86::getX86ConditionCode(), getX86SSEConditionCode(), llvm::Mips::GPRIdx, I, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::CmpInst::ICMP_NE, llvm::ARM_PROC::IE, llvm::X86ISD::INC, llvm::Type::isArrayTy(), llvm::Type::isDoubleTy(), llvm::Type::isFloatTy(), llvm::isInt< 32 >(), llvm::isInt< 8 >(), llvm::Type::isIntegerTy(), llvm::EVT::isSimple(), llvm::Type::isStructTy(), llvm::DILocalVariable::isValidLocationForIntrinsic(), llvm::Function::isVarArg(), llvm::Type::isVectorTy(), llvm::MemIntrinsic::isVolatile(), llvm::RegState::Kill, llvm::AMDGPUISD::KILL, llvm::X86::LAST_VALID_COND, LLVM_FALLTHROUGH, llvm_unreachable, MRI, Reg, llvm::ISD::SCALAR_TO_VECTOR, llvm::MachineFrameInfo::setFrameAddressIsTaken(), llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, Size, llvm::X86ISD::SMUL, llvm::ISD::SUB, std::swap(), TII, llvm::ISD::TRAP, TRI, llvm::X86ISD::UMUL, llvm::MCAsmInfo::usesWindowsCFI(), llvm::MVT::v4i32, llvm::MVT::v8i16, X86ChooseCmpOpcode(), X86SelectAddress(), and llvm::ISD::ZERO_EXTEND.

◆ X86ChooseCmpOpcode()

static unsigned X86ChooseCmpOpcode ( EVT  VT,
const X86Subtarget Subtarget 
)
static