LLVM API Documentation
#include "X86.h"#include "X86InstrBuilder.h"#include "X86ISelLowering.h"#include "X86MachineFunctionInfo.h"#include "X86RegisterInfo.h"#include "X86Subtarget.h"#include "X86TargetMachine.h"#include "llvm/GlobalValue.h"#include "llvm/Instructions.h"#include "llvm/Intrinsics.h"#include "llvm/Support/CFG.h"#include "llvm/Type.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFrameInfo.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/SelectionDAGISel.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Target/TargetOptions.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/Streams.h"#include "llvm/Support/raw_ostream.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/Support/CommandLine.h"#include "X86GenDAGISel.inc"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "x86-isel" |
Functions | |
| STATISTIC (NumLoadMoved,"Number of loads moved below TokenFactor") | |
| static void | MoveBelowTokenFactor (SelectionDAG *CurDAG, SDValue Load, SDValue Store, SDValue TF) |
| static bool | isRMWLoad (SDValue N, SDValue Chain, SDValue Address, SDValue &Load) |
| static void | MoveBelowCallSeqStart (SelectionDAG *CurDAG, SDValue Load, SDValue Call, SDValue CallSeqStart) |
| static bool | isCalleeLoad (SDValue Callee, SDValue &Chain) |
| static SDNode * | FindCallStartFromCall (SDNode *Node) |
| FunctionPass * | llvm::createX86ISelDag (X86TargetMachine &TM, CodeGenOpt::Level OptLevel) |
Variables | |
| static cl::opt< bool > | AvoidDupAddrCompute ("x86-avoid-dup-address", cl::Hidden) |
| #define DEBUG_TYPE "x86-isel" |
Definition at line 15 of file X86ISelDAGToDAG.cpp.
Definition at line 1450 of file X86ISelDAGToDAG.cpp.
References llvm::ISD::CALLSEQ_START, llvm::SDValue::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), and llvm::SDValue::getValueType().
isCalleeLoad - Return true if call address is a load and it can be moved below CALLSEQ_START and the chains leading up to the call. Return the CALLSEQ_START by reference as a second output.
Definition at line 430 of file X86ISelDAGToDAG.cpp.
References llvm::ISD::CALLSEQ_START, llvm::dyn_cast(), llvm::LSBaseSDNode::getAddressingMode(), llvm::LoadSDNode::getExtensionType(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getValue(), llvm::SDValue::hasOneUse(), llvm::SDValue::isOperandOf(), llvm::MemSDNode::isVolatile(), llvm::ISD::NON_EXTLOAD, llvm::ISD::TokenFactor, and llvm::ISD::UNINDEXED.
isRMWLoad - Return true if N is a load that's part of RMW sub-DAG.
Definition at line 369 of file X86ISelDAGToDAG.cpp.
References llvm::ISD::BIT_CONVERT, llvm::dyn_cast(), llvm::ISD::EXTLOAD, llvm::LSBaseSDNode::getAddressingMode(), llvm::LoadSDNode::getExtensionType(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::hasOneUse(), llvm::SDNode::isOperandOf(), llvm::MemSDNode::isVolatile(), llvm::ISD::NON_EXTLOAD, and llvm::ISD::UNINDEXED.
| static void MoveBelowCallSeqStart | ( | SelectionDAG * | CurDAG, | |
| SDValue | Load, | |||
| SDValue | Call, | |||
| SDValue | CallSeqStart | |||
| ) | [static] |
MoveBelowCallSeqStart - Replace CALLSEQ_START operand with load's chain operand and move load below the call's chain operand.
Definition at line 395 of file X86ISelDAGToDAG.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::SDValue::getDebugLoc(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), llvm::ISD::TokenFactor, and llvm::SelectionDAG::UpdateNodeOperands().
| static void MoveBelowTokenFactor | ( | SelectionDAG * | CurDAG, | |
| SDValue | Load, | |||
| SDValue | Store, | |||
| SDValue | TF | |||
| ) | [static] |
MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand and move load below the TokenFactor. Replace store's chain operand with load's chain result.
Definition at line 351 of file X86ISelDAGToDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOperand(), llvm::SDValue::getValue(), llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), and llvm::SelectionDAG::UpdateNodeOperands().
| STATISTIC | ( | NumLoadMoved | , | |
| "Number of loads moved below TokenFactor" | ||||
| ) |
Definition at line 78 of file X86ISelDAGToDAG.cpp.
Referenced by llvm::Recycler< llvm::MachineInstr >::Allocate(), llvm::MCContext::Allocate(), calculateMaxStackAlignment(), llvm::ComputeMaskedBits(), llvm::SelectionDAG::CreateStackTemporary(), llvm::SPURegisterInfo::determineFrameLayout(), llvm::XCoreRegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::AsmPrinter::EmitConstantPool(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), estimateStackSize(), llvm::Attribute::getAlignmentFromAttrs(), llvm::X86TargetLowering::getByValTypeAlignment(), llvm::X86RegisterInfo::getFrameIndexOffset(), llvm::SelectionDAG::getTargetConstantPool(), llvm::CCState::HandleByVal(), llvm::InlineFunction(), llvm::AsmPrinter::printBasicBlockLabel(), llvm::X86IntelAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), llvm::Recycler< llvm::MachineInstr >::PrintStats(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::FunctionLoweringInfo::set(), llvm::MachOCodeEmitter::startFunction(), llvm::ELFCodeEmitter::startFunction(), and llvm::X86InstrInfo::X86InstrInfo().
cl::opt<bool> AvoidDupAddrCompute("x86-avoid-dup-address", cl::Hidden) [static] |
| struct { ... } Base |
| enum { ... } BaseType |
Definition at line 75 of file X86ISelDAGToDAG.cpp.
Referenced by AddNodeIDCustom(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::MachOCodeEmitter::emitConstantPool(), llvm::ELFCodeEmitter::emitConstantPool(), llvm::AsmPrinter::EmitConstantPool(), FindScalarElement(), getAggregateConstantElement(), llvm::XCoreRegisterInfo::getReservedRegs(), getShuffleMask(), llvm::SelectionDAGLowering::getValue(), llvm::ExecutionEngine::InitializeMemory(), llvm::MachOWriter::InitMem(), isFloatingPointZero(), llvm::SystemZTargetLowering::LowerConstantPool(), LowerCONSTANTPOOL(), LowerConstantPool(), llvm::AlphaTargetLowering::LowerOperation(), llvm::MapValue(), RemapOperand(), and WriteConstantInt().
| int32_t Disp |
Definition at line 72 of file X86ISelDAGToDAG.cpp.
| const char* ES |
Definition at line 76 of file X86ISelDAGToDAG.cpp.
Referenced by llvm::PIC16TargetLowering::ExpandExternalSymbol(), and llvm::PIC16TargetLowering::ExpandFrameIndex().
| int FrameIndex |
Definition at line 67 of file X86ISelDAGToDAG.cpp.
Definition at line 74 of file X86ISelDAGToDAG.cpp.
Referenced by AnalyzeGlobal(), llvm::MachineModuleInfo::AnalyzeModule(), ByteswapSCANFResults(), CanRematLoadWithDispOperand(), llvm::CloneModule(), llvm::ComputeMaskedBits(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldInstOperands(), llvm::DIFactory::CreateBasicType(), llvm::DIFactory::CreateBlock(), llvm::DIFactory::CreateCompileUnit(), llvm::DIFactory::CreateCompositeType(), llvm::DIFactory::CreateDerivedType(), llvm::DIFactory::CreateEnumerator(), llvm::DIFactory::CreateGlobalVariable(), createSlotTracker(), llvm::DIFactory::CreateSubprogram(), llvm::DIFactory::CreateVariable(), llvm::DIVariable::DIVariable(), llvm::AsmPrinter::doFinalization(), llvm::ExecutionEngine::emitGlobals(), EnforceKnownAlignment(), evaluateICmpRelation(), ExtractTypeInfo(), findUsedValues(), fitsInAddressMode(), llvm::GlobalAlias::getAliasedGlobal(), llvm::GetConstantStringInfo(), llvm::ExecutionEngine::getConstantValue(), llvm::DbgStopPointInst::getDirectory(), llvm::DbgStopPointInst::getFileName(), llvm::ProgramInfo::getFunction(), getGlobalVariablesUsing(), llvm::MSILWriter::getLabelName(), llvm::getLocationInfo(), getModuleFromVal(), getNextStopPoint(), llvm::DIFactory::GetOrCreateArray(), llvm::DIFactory::GetOrCreateSubrange(), llvm::Module::getOrInsertGlobal(), llvm::Constant::getRelocationInfo(), GetStringLengthH(), getSymTab(), llvm::SelectionDAGLowering::getValue(), llvm::MSILWriter::getValueName(), isKnownNonNull(), isMemSrcFromString(), isObjectSmallerThan(), llvm::isSafeToLoadUnconditionally(), llvm::Instruction::isSafeToSpeculativelyExecute(), llvm::SelectionDAG::isVerifiedDebugInfoDesc(), lle_X_atexit(), lle_X_fprintf(), lle_X_printf(), lle_X_scanf(), lle_X_sprintf(), lle_X_sscanf(), LLVMGetNextGlobal(), LLVMGetPreviousGlobal(), LLVMSetLinkage(), llvm::SPUTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerGLOBALADDRESS(), llvm::MSP430TargetLowering::LowerGlobalAddress(), llvm::X86ATTAsmPrinter::LowerGlobalAddressOperand(), llvm::AlphaTargetLowering::LowerOperation(), PointsToConstantGlobal(), llvm::X86IntelAsmPrinter::print_pcrel_imm(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printSymbolOperand(), llvm::DebugInfoFinder::processModule(), RemoveDeadConstant(), llvm::GlobalAlias::resolveAliasedGlobal(), ResolveAliases(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::SourceFunctionInfo::SourceFunctionInfo(), llvm::DbgInfoIntrinsic::StripCast(), StripDebugInfo(), llvm::DIDescriptor::ValidDebugInfo(), and WriteModuleInfo().
| unsigned Indent |
Definition at line 57861 of file X86ISelDAGToDAG.cpp.
Definition at line 71 of file X86ISelDAGToDAG.cpp.
| SelectionDAG::allnodes_iterator& ISelPosition |
ISelPosition - Node iterator marking the current position of instruction selection as it procedes through the topologically-sorted node list.
Definition at line 223 of file X86ISelDAGToDAG.cpp.
| int JT |
Definition at line 77 of file X86ISelDAGToDAG.cpp.
Referenced by llvm::AsmPrinter::EmitJumpTableInfo(), llvm::MachOCodeEmitter::emitJumpTables(), llvm::ELFCodeEmitter::emitJumpTables(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), GetJumpTableSizeInBytes(), llvm::SystemZTargetLowering::LowerJumpTable(), and LowerJumpTable().
OptForSize - If true, selector should try to optimize for code size instead of performance.
Definition at line 161 of file X86ISelDAGToDAG.cpp.
Definition at line 66 of file X86ISelDAGToDAG.cpp.
Definition at line 70 of file X86ISelDAGToDAG.cpp.
Definition at line 73 of file X86ISelDAGToDAG.cpp.
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::X86IntelAsmPrinter::printMemReference(), and llvm::X86ATTAsmPrinter::printMemReference().
| const X86Subtarget* Subtarget |
Subtarget - Keep a pointer to the X86Subtarget around so that we can make the right decision when generating code for different targets.
Definition at line 157 of file X86ISelDAGToDAG.cpp.
| unsigned char SymbolFlags |
Definition at line 79 of file X86ISelDAGToDAG.cpp.
X86Lowering - This object fully describes how to lower LLVM code to an X86-specific SelectionDAG.
Definition at line 153 of file X86ISelDAGToDAG.cpp.