15 #ifndef LLVM_CODEGEN_SELECTIONDAGISEL_H
16 #define LLVM_CODEGEN_SELECTIONDAGISEL_H
25 class SelectionDAGBuilder;
27 class MachineRegisterInfo;
28 class MachineBasicBlock;
29 class MachineFunction;
32 class TargetLibraryInfo;
33 class TargetTransformInfo;
34 class FunctionLoweringInfo;
35 class ScheduleHazardRecognizer;
37 class ScheduleDAGSDNodes;
89 std::vector<SDValue> &OutOps) {
103 bool IgnoreChains =
false);
206 int64_t DesiredMaskS)
const;
208 int64_t DesiredMaskS)
const;
238 const unsigned char *MatcherTable,
246 void CannotYetSelect(
SDNode *
N);
249 void DoInstructionSelection();
251 const SDValue *Ops,
unsigned NumOps,
unsigned EmitNodeInfo);
253 void PrepareEHLandingPad();
256 void SelectAllBasicBlocks(
const Function &Fn);
264 void FinishBasicBlock();
266 void CodeGenAndEmitDAG();
272 void ComputeLiveOutVRegInfo();
282 std::vector<unsigned> OpcodeOffset;
284 void UpdateChainsAndGlue(
SDNode *NodeToMatch,
SDValue InputChain,
void ReplaceUses(SDNode *F, SDNode *T)
SelectionDAGBuilder * SDB
virtual const TargetLowering * getTargetLowering() const
static int getNumFixedFromVariadicInfo(unsigned Flags)
void ReplaceUses(SDValue F, SDValue T)
virtual ~SelectionDAGISel()
virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, std::vector< SDValue > &OutOps)
void ReplaceAllUsesOfValuesWith(const SDValue *From, const SDValue *To, unsigned Num)
const TargetLibraryInfo * LibInfo
bool CheckAndMask(SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const
static bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, CodeGenOpt::Level OptLevel, bool IgnoreChains=false)
#define llvm_unreachable(msg)
const TargetLowering * getTargetLowering() const
SDNode * SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, unsigned TableSize)
virtual bool runOnMachineFunction(MachineFunction &MF)
MachineRegisterInfo * RegInfo
virtual bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const
CodeGenOpt::Level OptLevel
virtual bool CheckNodePredicate(SDNode *N, unsigned PredNo) const
void SelectInlineAsmMemoryOperands(std::vector< SDValue > &Ops)
virtual void getAnalysisUsage(AnalysisUsage &AU) const
virtual void EmitFunctionEntryCode()
virtual void PostprocessISelDAG()
virtual SDNode * Select(SDNode *N)=0
Select - Main hook targets implement to select a node.
SelectionDAGISel(TargetMachine &tm, CodeGenOpt::Level OL=CodeGenOpt::Default)
virtual bool CheckComplexPattern(SDNode *Root, SDNode *Parent, SDValue N, unsigned PatternNo, SmallVectorImpl< std::pair< SDValue, SDNode * > > &Result)
void ReplaceAllUsesWith(SDValue From, SDValue Op)
bool CheckOrMask(SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const
virtual bool CheckPatternPredicate(unsigned PredNo) const
void ReplaceUses(const SDValue *F, const SDValue *T, unsigned Num)
void ReplaceAllUsesOfValueWith(SDValue From, SDValue To)
virtual void PreprocessISelDAG()
const TargetTransformInfo * TTI
FunctionLoweringInfo * FuncInfo
virtual SDValue RunSDNodeXForm(SDValue V, unsigned XFormNo)