#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/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/IntrinsicsX86.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"
usingnamespacellvm;
namespace {
class X86FastISel final : public FastISel { … };
}
static std::pair<unsigned, bool>
getX86SSEConditionCode(CmpInst::Predicate Predicate) { … }
const MachineInstrBuilder &
X86FastISel::addFullAddress(const MachineInstrBuilder &MIB,
X86AddressMode &AM) { … }
bool X86FastISel::foldX86XALUIntrinsic(X86::CondCode &CC, const Instruction *I,
const Value *Cond) { … }
bool X86FastISel::isTypeLegal(Type *Ty, MVT &VT, bool AllowI1) { … }
bool X86FastISel::X86FastEmitLoad(MVT VT, X86AddressMode &AM,
MachineMemOperand *MMO, unsigned &ResultReg,
unsigned Alignment) { … }
bool X86FastISel::X86FastEmitStore(EVT VT, unsigned ValReg, X86AddressMode &AM,
MachineMemOperand *MMO, bool Aligned) { … }
bool X86FastISel::X86FastEmitStore(EVT VT, const Value *Val,
X86AddressMode &AM,
MachineMemOperand *MMO, bool Aligned) { … }
bool X86FastISel::X86FastEmitExtend(ISD::NodeType Opc, EVT DstVT,
unsigned Src, EVT SrcVT,
unsigned &ResultReg) { … }
bool X86FastISel::handleConstantAddresses(const Value *V, X86AddressMode &AM) { … }
bool X86FastISel::X86SelectAddress(const Value *V, X86AddressMode &AM) { … }
bool X86FastISel::X86SelectCallAddress(const Value *V, X86AddressMode &AM) { … }
bool X86FastISel::X86SelectStore(const Instruction *I) { … }
bool X86FastISel::X86SelectRet(const Instruction *I) { … }
bool X86FastISel::X86SelectLoad(const Instruction *I) { … }
static unsigned X86ChooseCmpOpcode(EVT VT, const X86Subtarget *Subtarget) { … }
static unsigned X86ChooseCmpImmediateOpcode(EVT VT, const ConstantInt *RHSC) { … }
bool X86FastISel::X86FastEmitCompare(const Value *Op0, const Value *Op1, EVT VT,
const DebugLoc &CurMIMD) { … }
bool X86FastISel::X86SelectCmp(const Instruction *I) { … }
bool X86FastISel::X86SelectZExt(const Instruction *I) { … }
bool X86FastISel::X86SelectSExt(const Instruction *I) { … }
bool X86FastISel::X86SelectBranch(const Instruction *I) { … }
bool X86FastISel::X86SelectShift(const Instruction *I) { … }
bool X86FastISel::X86SelectDivRem(const Instruction *I) { … }
bool X86FastISel::X86FastEmitCMoveSelect(MVT RetVT, const Instruction *I) { … }
bool X86FastISel::X86FastEmitSSESelect(MVT RetVT, const Instruction *I) { … }
bool X86FastISel::X86FastEmitPseudoSelect(MVT RetVT, const Instruction *I) { … }
bool X86FastISel::X86SelectSelect(const Instruction *I) { … }
bool X86FastISel::X86SelectIntToFP(const Instruction *I, bool IsSigned) { … }
bool X86FastISel::X86SelectSIToFP(const Instruction *I) { … }
bool X86FastISel::X86SelectUIToFP(const Instruction *I) { … }
bool X86FastISel::X86SelectFPExtOrFPTrunc(const Instruction *I,
unsigned TargetOpc,
const TargetRegisterClass *RC) { … }
bool X86FastISel::X86SelectFPExt(const Instruction *I) { … }
bool X86FastISel::X86SelectFPTrunc(const Instruction *I) { … }
bool X86FastISel::X86SelectTrunc(const Instruction *I) { … }
bool X86FastISel::IsMemcpySmall(uint64_t Len) { … }
bool X86FastISel::TryEmitSmallMemcpy(X86AddressMode DestAM,
X86AddressMode SrcAM, uint64_t Len) { … }
bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) { … }
bool X86FastISel::fastLowerArguments() { … }
static unsigned computeBytesPoppedByCalleeForSRet(const X86Subtarget *Subtarget,
CallingConv::ID CC,
const CallBase *CB) { … }
bool X86FastISel::fastLowerCall(CallLoweringInfo &CLI) { … }
bool
X86FastISel::fastSelectInstruction(const Instruction *I) { … }
unsigned X86FastISel::X86MaterializeInt(const ConstantInt *CI, MVT VT) { … }
unsigned X86FastISel::X86MaterializeFP(const ConstantFP *CFP, MVT VT) { … }
unsigned X86FastISel::X86MaterializeGV(const GlobalValue *GV, MVT VT) { … }
unsigned X86FastISel::fastMaterializeConstant(const Constant *C) { … }
unsigned X86FastISel::fastMaterializeAlloca(const AllocaInst *C) { … }
unsigned X86FastISel::fastMaterializeFloatZero(const ConstantFP *CF) { … }
bool X86FastISel::tryToFoldLoadIntoMI(MachineInstr *MI, unsigned OpNo,
const LoadInst *LI) { … }
unsigned X86FastISel::fastEmitInst_rrrr(unsigned MachineInstOpcode,
const TargetRegisterClass *RC,
unsigned Op0, unsigned Op1,
unsigned Op2, unsigned Op3) { … }
namespace llvm {
FastISel *X86::createFastISel(FunctionLoweringInfo &funcInfo,
const TargetLibraryInfo *libInfo) { … }
}