LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::SelectionDAGISel Class Reference

#include <SelectionDAGISel.h>

Inheritance diagram for llvm::SelectionDAGISel:

Inheritance graph
[legend]
Collaboration diagram for llvm::SelectionDAGISel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SelectionDAGISel (TargetLowering &tli, bool fast=false)
virtual ~SelectionDAGISel ()
TargetLoweringgetTargetLowering ()
virtual void getAnalysisUsage (AnalysisUsage &AU) const
virtual bool runOnFunction (Function &Fn)
unsigned MakeReg (MVT VT)
virtual void EmitFunctionEntryCode (Function &Fn, MachineFunction &MF)
virtual void InstructionSelect ()=0
virtual void InstructionSelectPostProcessing ()
void SelectRootInit ()
virtual bool SelectInlineAsmMemoryOperand (const SDValue &Op, char ConstraintCode, std::vector< SDValue > &OutOps)
virtual bool CanBeFoldedBy (SDNode *N, SDNode *U, SDNode *Root) const
virtual HazardRecognizerCreateTargetHazardRecognizer ()

Public Attributes

TargetLoweringTLI
MachineRegisterInfoRegInfo
FunctionLoweringInfoFuncInfo
SelectionDAGCurDAG
SelectionDAGLoweringSDL
MachineBasicBlockBB
AliasAnalysisAA
GCFunctionInfoGFI
bool Fast
std::vector< SDNode * > TopOrder

Static Public Attributes

char ID = 0

Protected Member Functions

void SelectInlineAsmMemoryOperands (std::vector< SDValue > &Ops)
bool CheckAndMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const
bool CheckOrMask (SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const

Protected Attributes

unsigned DAGSize

Detailed Description

SelectionDAGISel - This is the common base class used for SelectionDAG-based pattern-matching instruction selectors.

Definition at line 39 of file SelectionDAGISel.h.


Constructor & Destructor Documentation

SelectionDAGISel::SelectionDAGISel TargetLowering tli,
bool  fast = false
[explicit]
 

Definition at line 259 of file SelectionDAGISel.cpp.

SelectionDAGISel::~SelectionDAGISel  )  [virtual]
 

Definition at line 269 of file SelectionDAGISel.cpp.


Member Function Documentation

virtual bool llvm::SelectionDAGISel::CanBeFoldedBy SDNode N,
SDNode U,
SDNode Root
const [inline, virtual]
 

CanBeFoldedBy - Returns true if the specific operand node N of U can be folded during instruction selection that starts at Root?

Reimplemented in X86DAGToDAGISel.

Definition at line 85 of file SelectionDAGISel.h.

bool SelectionDAGISel::CheckAndMask SDValue  LHS,
ConstantSDNode RHS,
int64_t  DesiredMaskS
const [protected]
 

CheckAndMask - The isel is trying to match something like (and X, 255). If the dag combiner simplified the 255, we still want to match. RHS is the actual value in the DAG on the RHS of an AND, and DesiredMaskS is the value specified in the .td file (e.g. 255).

Definition at line 1040 of file SelectionDAGISel.cpp.

References CurDAG, llvm::ConstantSDNode::getAPIntValue(), llvm::SDValue::getValueSizeInBits(), llvm::APInt::intersects(), and llvm::SelectionDAG::MaskedValueIsZero().

bool SelectionDAGISel::CheckOrMask SDValue  LHS,
ConstantSDNode RHS,
int64_t  DesiredMaskS
const [protected]
 

CheckOrMask - The isel is trying to match something like (or X, 255). If the dag combiner simplified the 255, we still want to match. RHS is the actual value in the DAG on the RHS of an OR, and DesiredMaskS is the value specified in the .td file (e.g. 255).

Definition at line 1069 of file SelectionDAGISel.cpp.

References llvm::SelectionDAG::ComputeMaskedBits(), CurDAG, llvm::ConstantSDNode::getAPIntValue(), llvm::SDValue::getValueSizeInBits(), and llvm::APInt::intersects().

HazardRecognizer * SelectionDAGISel::CreateTargetHazardRecognizer  )  [virtual]
 

CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer to use for this target when scheduling the DAG.

Reimplemented in SPUDAGToDAGISel, and PPCDAGToDAGISel.

Definition at line 1027 of file SelectionDAGISel.cpp.

Referenced by llvm::createTDListDAGScheduler().

virtual void llvm::SelectionDAGISel::EmitFunctionEntryCode Function Fn,
MachineFunction MF
[inline, virtual]
 

Reimplemented in X86DAGToDAGISel.

Definition at line 64 of file SelectionDAGISel.h.

void SelectionDAGISel::getAnalysisUsage AnalysisUsage AU  )  const [virtual]
 

getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.

Reimplemented from llvm::Pass.

Definition at line 279 of file SelectionDAGISel.cpp.

References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().

TargetLowering& llvm::SelectionDAGISel::getTargetLowering  )  [inline]
 

Definition at line 56 of file SelectionDAGISel.h.

Referenced by llvm::createDefaultScheduler().

virtual void llvm::SelectionDAGISel::InstructionSelect  )  [pure virtual]
 

Implemented in AlphaDAGToDAGISel, ARMDAGToDAGISel, SPUDAGToDAGISel, IA64DAGToDAGISel, MipsDAGToDAGISel, PIC16DAGToDAGISel, PPCDAGToDAGISel, SparcDAGToDAGISel, and X86DAGToDAGISel.

virtual void llvm::SelectionDAGISel::InstructionSelectPostProcessing  )  [inline, virtual]
 

Reimplemented in X86DAGToDAGISel.

Definition at line 66 of file SelectionDAGISel.h.

unsigned SelectionDAGISel::MakeReg MVT  VT  ) 
 

Definition at line 275 of file SelectionDAGISel.cpp.

References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetLowering::getRegClassFor(), RegInfo, and TLI.

bool SelectionDAGISel::runOnFunction Function Fn  )  [virtual]
 

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

Implements llvm::FunctionPass.

Reimplemented in SPUDAGToDAGISel, IA64DAGToDAGISel, PPCDAGToDAGISel, and X86DAGToDAGISel.

Definition at line 285 of file SelectionDAGISel.cpp.

References AA, llvm::MachineFunction::begin(), llvm::Function::begin(), llvm::FunctionLoweringInfo::CatchInfoFound, llvm::FunctionLoweringInfo::CatchInfoLost, llvm::FunctionLoweringInfo::clear(), CurDAG, DOUT, EmitLiveInCopies(), EnableFastISel, llvm::Function::end(), FuncInfo, llvm::MachineFunction::getFunction(), llvm::TargetMachine::getInstrInfo(), llvm::Value::getName(), llvm::MachineFunction::getRegInfo(), llvm::TargetMachine::getRegisterInfo(), llvm::InvokeInst::getSuccessor(), llvm::TargetLowering::getTargetMachine(), GFI, llvm::Function::hasGC(), llvm::SelectionDAGLowering::init(), llvm::SelectionDAG::init(), llvm::MachineRegisterInfo::livein_begin(), llvm::MachineRegisterInfo::livein_end(), llvm::FunctionLoweringInfo::MBBMap, RegInfo, SDL, llvm::FunctionLoweringInfo::set(), llvm::SmallSet< T, N >::size(), and TLI.

virtual bool llvm::SelectionDAGISel::SelectInlineAsmMemoryOperand const SDValue Op,
char  ConstraintCode,
std::vector< SDValue > &  OutOps
[inline, virtual]
 

SelectInlineAsmMemoryOperand - Select the specified address as a target addressing mode, according to the specified constraint code. If this does not match or is not implemented, return true. The resultant operands (which will appear in the machine instruction) should be added to the OutOps vector.

Reimplemented in AlphaDAGToDAGISel, SPUDAGToDAGISel, and PPCDAGToDAGISel.

Definition at line 77 of file SelectionDAGISel.h.

Referenced by SelectInlineAsmMemoryOperands().

void SelectionDAGISel::SelectInlineAsmMemoryOperands std::vector< SDValue > &  Ops  )  [protected]
 

SelectInlineAsmMemoryOperands - Calls to this are automatically generated by tblgen. Others should not call it.

Definition at line 1103 of file SelectionDAGISel.cpp.

References CurDAG, llvm::TargetLowering::getPointerTy(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), SelectInlineAsmMemoryOperand(), and std::swap().

void llvm::SelectionDAGISel::SelectRootInit  )  [inline]
 

Definition at line 68 of file SelectionDAGISel.h.


Member Data Documentation

AliasAnalysis* llvm::SelectionDAGISel::AA
 

Definition at line 47 of file SelectionDAGISel.h.

Referenced by runOnFunction().

MachineBasicBlock* llvm::SelectionDAGISel::BB
 

Definition at line 46 of file SelectionDAGISel.h.

SelectionDAG* llvm::SelectionDAGISel::CurDAG
 

Definition at line 44 of file SelectionDAGISel.h.

Referenced by CheckAndMask(), CheckOrMask(), runOnFunction(), and SelectInlineAsmMemoryOperands().

unsigned llvm::SelectionDAGISel::DAGSize [protected]
 

DAGSize - Size of DAG being instruction selected.

Definition at line 96 of file SelectionDAGISel.h.

bool llvm::SelectionDAGISel::Fast
 

Definition at line 49 of file SelectionDAGISel.h.

FunctionLoweringInfo* llvm::SelectionDAGISel::FuncInfo
 

Definition at line 43 of file SelectionDAGISel.h.

Referenced by runOnFunction().

GCFunctionInfo* llvm::SelectionDAGISel::GFI
 

Definition at line 48 of file SelectionDAGISel.h.

Referenced by runOnFunction().

char SelectionDAGISel::ID = 0 [static]
 

Definition at line 1143 of file SelectionDAGISel.cpp.

MachineRegisterInfo* llvm::SelectionDAGISel::RegInfo
 

Definition at line 42 of file SelectionDAGISel.h.

Referenced by MakeReg(), and runOnFunction().

SelectionDAGLowering* llvm::SelectionDAGISel::SDL
 

Definition at line 45 of file SelectionDAGISel.h.

Referenced by runOnFunction().

TargetLowering& llvm::SelectionDAGISel::TLI
 

Definition at line 41 of file SelectionDAGISel.h.

Referenced by MakeReg(), and runOnFunction().

std::vector<SDNode*> llvm::SelectionDAGISel::TopOrder
 

Definition at line 50 of file SelectionDAGISel.h.


The documentation for this class was generated from the following files:


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.