LLVM API Documentation

X86ISelDAGToDAG.cpp File Reference

#include "X86.h"
#include "X86InstrBuilder.h"
#include "X86ISelLowering.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/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/Statistic.h"
#include <iostream>
#include <set>
#include "X86GenDAGISel.inc"

Include dependency graph for X86ISelDAGToDAG.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "isel"

Functions

static void EmitSpecialCodeForMain (MachineBasicBlock *BB, MachineFrameInfo *MFI)
static bool isRegister0 (SDOperand Op)
FunctionPassllvm::createX86ISelDag (X86TargetMachine &TM)

Variables

enum { ... } ::X86ISelAddressMode::@196 BaseType
SDOperand Reg
int FrameIndex
{ ... } ::X86ISelAddressMode::@197 Base
unsigned Scale
SDOperand IndexReg
unsigned Disp
GlobalValueGV
ConstantCP
unsigned Align
Statistic NumFPKill ("x86-codegen","Number of FP_REG_KILL instructions added")
bool ContainsFPCode
X86TargetLowering X86Lowering
const X86SubtargetSubtarget
unsigned GlobalBaseReg
std::map< SDOperand, SDOperandCodeGenMap
std::map< SDOperand, SDOperandHandleMap
std::map< SDOperand, SDOperandReplaceMap
unsigned Indent


Define Documentation

#define DEBUG_TYPE   "isel"

Definition at line 15 of file X86ISelDAGToDAG.cpp.


Function Documentation

static void EmitSpecialCodeForMain ( MachineBasicBlock BB,
MachineFrameInfo MFI 
) [static]

EmitSpecialCodeForMain - Emit any code that needs to be executed only in the main function.

Definition at line 250 of file X86ISelDAGToDAG.cpp.

References llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), BB, llvm::BuildMI(), and llvm::MachineFrameInfo::CreateStackObject().

static bool isRegister0 ( SDOperand  Op  )  [static]

Definition at line 495 of file X86ISelDAGToDAG.cpp.

References Op, and R.


Variable Documentation

unsigned Align

Definition at line 63 of file X86ISelDAGToDAG.cpp.

Referenced by llvm::X86SharedAsmPrinter::doFinalization(), llvm::X86RegisterInfo::eliminateCallFramePseudoInstr(), llvm::PPCRegisterInfo::eliminateCallFramePseudoInstr(), llvm::IA64RegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::FunctionLoweringInfo::FunctionLoweringInfo(), GetKnownAlignment(), llvm::TargetData::getTypeAlignment(), llvm::TargetData::getTypeAlignmentShift(), llvm::TargetData::getTypeSize(), llvm::X86TargetLowering::LowerOperation(), llvm::BytecodeReader::ParseInstruction(), llvm::ELFCodeEmitter::startFunction(), llvm::SelectionDAGLowering::visitAlloca(), and llvm::SelectionDAGLowering::visitMemIntrinsic().

struct { ... } Base

Referenced by ConstantFold(), getMemBasePlusOffset(), llvm::AlphaTargetLowering::LowerOperation(), and RemoveCommonExpressionsFromUseBases().

enum { ... } BaseType

Referenced by llvm::ConvertExpressionToType(), and llvm::ExpressionConvertibleToType().

std::map<SDOperand, SDOperand> CodeGenMap

Definition at line 131 of file X86ISelDAGToDAG.cpp.

bool ContainsFPCode

ContainsFPCode - Every instruction we select that uses or defines a FP register should set this to true.

Definition at line 83 of file X86ISelDAGToDAG.cpp.

Constant* CP

Definition at line 62 of file X86ISelDAGToDAG.cpp.

Referenced by CastConstantPacked(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::SDNode::dump(), llvm::AsmPrinter::EmitConstantPool(), llvm::AsmPrinter::EmitGlobalConstant(), FindScalarElement(), getAggregateConstantElement(), getValType(), llvm::SelectionDAGLowering::getValue(), llvm::ExecutionEngine::InitializeMemory(), isFloatingPointZero(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), llvm::MapValue(), RemapOperand(), and WriteConstantInt().

unsigned Disp

Definition at line 60 of file X86ISelDAGToDAG.cpp.

int FrameIndex

Definition at line 55 of file X86ISelDAGToDAG.cpp.

unsigned GlobalBaseReg

Definition at line 93 of file X86ISelDAGToDAG.cpp.

GlobalValue* GV

Definition at line 61 of file X86ISelDAGToDAG.cpp.

Referenced by llvm::DSNode::addGlobal(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstr::addGlobalAddressOperand(), llvm::ExecutionEngine::addGlobalMapping(), AddressIsTaken(), AllUsesOfLoadedValueWillTrapIfNull(), DIVerifyVisitor::Apply(), DISerializeVisitor::Apply(), DIDeserializeVisitor::Apply(), llvm::DSGraph::AssertNodeContainsGlobal(), ByteswapSCANFResults(), CallersAllIgnoreReturnValue(), llvm::CloneModule(), CommitValueTo(), ComputeLoadResult(), ConstantFold(), llvm::ConstantFoldCastInstruction(), llvm::ConvertConstantToIntType(), llvm::ConvertExpressionToType(), createSlotMachine(), DarwinGVRequiresExtraLoad(), llvm::CompileUnitDesc::DebugVersionFromGlobal(), llvm::DIDeserializer::Deserialize(), llvm::ilist_traits< GlobalVariable >::destroySentinel(), llvm::DSGraph::DSGraph(), EliminateUsesOfECGlobals(), llvm::AsmPrinter::EmitAlignment(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::ExecutionEngine::EmitGlobalVariable(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::DSScalarMap::erase(), EvaluateExpression(), llvm::Interpreter::exitCalled(), llvm::DSScalarMap::find(), FindStaticTors(), ForceRenaming(), GetAddressedElementFromGlobal(), llvm::MachineDebugInfo::getAnchoredDescriptors(), getConstantStringLength(), llvm::ExecutionEngine::getConstantValue(), llvm::DbgStopPointInst::getDirectory(), getEncodedLinkage(), llvm::DbgStopPointInst::getFileName(), llvm::ProgramInfo::getFunction(), llvm::SelectionDAG::getGlobalAddress(), getGlobalVariable(), getGlobalVariableClass(), getGlobalVariablesUsing(), GetKnownAlignment(), llvm::DSScalarMap::getLeaderForGlobal(), getModuleFromVal(), getNextStopPoint(), llvm::JIT::getOrEmitGlobalVariable(), llvm::ExecutionEngine::getOrEmitGlobalVariable(), llvm::ExecutionEngine::getPointerToGlobal(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), llvm::AsmPrinter::getPreferredAlignmentLog(), llvm::DSScalarMap::getRawEntryRef(), getStringRef(), llvm::Constant::getStringValue(), llvm::SelectionDAG::getTargetGlobalAddress(), getUIntOperand(), getUnderlyingObject(), llvm::SelectionDAGLowering::getValue(), llvm::Mangler::getValueName(), llvm::DSScalarMap::global_count(), GV_to_size_t(), llvm::GVTOP(), llvm::X86TargetLowering::isLegalAddressImmediate(), isSimpleEnoughPointerToCommit(), isStringValue(), lle_i_clock(), lle_X_atexit(), lle_X_atoi(), lle_X_exp(), lle_X_fclose(), lle_X_feof(), lle_X_ferror(), lle_X_fflush(), lle_X_floor(), lle_X_fprintf(), lle_X_fputc(), lle_X_getc(), lle_X_log(), lle_X_pow(), lle_X_printf(), lle_X_puts(), lle_X_rand(), lle_X_scanf(), lle_X_sprintf(), lle_X_sqrt(), lle_X_sscanf(), lle_X_ungetc(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), maybeAddInternalValueToVector(), llvm::CachedWriter::operator<<(), llvm::DSScalarMap::operator[](), OptimizeAwayTrappingUsesOfLoads(), OptimizeGlobalAddressOfMalloc(), OptimizeOnceStoredGlobal(), llvm::BytecodeReader::ParseConstantPoolValue(), ParseGlobalCtors(), ParseGlobalVariable(), llvm::BytecodeReader::ParseModule(), llvm::BytecodeReader::ParseModuleGlobalInfo(), llvm::X86IntelAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), ProcessGlobalsWithSameName(), RemoveDeadConstant(), llvm::DSNode::removeGlobal(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::DISerializer::Serialize(), llvm::GlobalVariableDesc::setGlobalVariable(), llvm::Value::setName(), ShrinkGlobalToBoolean(), llvm::SourceFunctionInfo::SourceFunctionInfo(), SRAGlobal(), llvm::DbgInfoIntrinsic::StripCast(), llvm::AsmPrinter::SwitchSection(), llvm::DebugInfoDesc::TagFromGlobal(), SCCPSolver::TrackValueOfGlobalVariable(), llvm::ExecutionEngine::updateGlobalMapping(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::DIVerifier::Verify(), and llvm::SelectionDAGLowering::visitMemIntrinsic().

std::map<SDOperand, SDOperand> HandleMap

Definition at line 134 of file X86ISelDAGToDAG.cpp.

unsigned Indent

Definition at line 27035 of file X86ISelDAGToDAG.cpp.

Referenced by WriteConstantInt().

SDOperand IndexReg

Definition at line 59 of file X86ISelDAGToDAG.cpp.

Referenced by llvm::X86IntelAsmPrinter::printMemReference(), and llvm::X86ATTAsmPrinter::printMemReference().

Statistic NumFPKill("x86-codegen","Number of FP_REG_KILL instructions added") [static]

SDOperand Reg

Definition at line 54 of file X86ISelDAGToDAG.cpp.

Referenced by llvm::FunctionLoweringInfo::CreateRegForValue(), llvm::ScheduleDAG::EmitNode(), llvm::SelectionDAG::getCopyToReg(), getFPReg(), llvm::RegisterSDNode::getReg(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAGLowering::GetRegistersForValue(), AvailableSpills::ModifyStackSlot(), and llvm::SelectionDAGLowering::visitInlineAsm().

std::map<SDOperand, SDOperand> ReplaceMap

Definition at line 137 of file X86ISelDAGToDAG.cpp.

unsigned Scale

Definition at line 58 of file X86ISelDAGToDAG.cpp.

Referenced by EmitGEPOffset(), llvm::SCEVMulExpr::get(), and llvm::SelectionDAGLowering::visitGetElementPtr().

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 91 of file X86ISelDAGToDAG.cpp.

X86TargetLowering X86Lowering

X86Lowering - This object fully describes how to lower LLVM code to an X86-specific SelectionDAG.

Definition at line 87 of file X86ISelDAGToDAG.cpp.