LLVM API Documentation

X86ISelDAGToDAG.cpp File Reference

#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"

Include dependency graph for X86ISelDAGToDAG.cpp:

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 Documentation

#define DEBUG_TYPE   "x86-isel"

Definition at line 15 of file X86ISelDAGToDAG.cpp.


Function Documentation

static SDNode* FindCallStartFromCall ( SDNode *  Node  )  [static]

static bool isCalleeLoad ( SDValue  Callee,
SDValue &  Chain 
) [static]

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.

static bool isRMWLoad ( SDValue  N,
SDValue  Chain,
SDValue  Address,
SDValue &  Load 
) [static]

static void MoveBelowCallSeqStart ( SelectionDAG *  CurDAG,
SDValue  Load,
SDValue  Call,
SDValue  CallSeqStart 
) [static]

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"   
)


Variable Documentation

cl::opt<bool> AvoidDupAddrCompute("x86-avoid-dup-address", cl::Hidden) [static]

struct { ... } Base

enum { ... } BaseType

int32_t Disp

Definition at line 72 of file X86ISelDAGToDAG.cpp.

const char* ES

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

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.

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.

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.