13 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONISELDAGTODAG_H 14 #define LLVM_LIB_TARGET_HEXAGON_HEXAGONISELDAGTODAG_H 26 class MachineFunction;
27 class HexagonInstrInfo;
28 class HexagonRegisterInfo;
29 class HexagonTargetLowering;
75 return "Hexagon DAG->DAG Pattern Instruction Selection";
90 unsigned ConstraintID,
91 std::vector<SDValue> &OutOps)
override;
118 #define GET_DAGISEL_DECL 119 #include "HexagonGenDAGISel.inc" 132 void SelectHvxShuffle(
SDNode *N);
133 void SelectHvxRor(
SDNode *N);
134 void SelectHvxVAlign(
SDNode *N);
136 bool keepsLowBits(
const SDValue &Val,
unsigned NumBits,
SDValue &Src);
137 bool isAlignedMemNode(
const MemSDNode *N)
const;
138 bool isSmallStackStore(
const StoreSDNode *N)
const;
139 bool isPositiveHalfWord(
const SDNode *N)
const;
140 bool hasOneUse(
const SDNode *N)
const;
143 void ppSimplifyOrSelect0(std::vector<SDNode*> &&Nodes);
144 void ppAddrReorderAddShl(std::vector<SDNode*> &&Nodes);
145 void ppAddrRewriteAndSrl(std::vector<SDNode*> &&Nodes);
146 void ppHoistZextI1(std::vector<SDNode*> &&Nodes);
155 unsigned getUsesInFunction(
const Value *V);
157 void rebalanceAddressTrees();
161 #endif // LLVM_LIB_TARGET_HEXAGON_HEXAGONISELDAGTODAG_H void SelectV2Q(SDNode *N)
This class represents lattice values for constants.
void EmitFunctionEntryCode() override
void SelectIntrinsicWOChain(SDNode *N)
bool DetectUseSxtw(SDValue &N, SDValue &R)
bool SelectAddrFI(SDValue &N, SDValue &R)
void SelectFrameIndex(SDNode *N)
void SelectP2D(SDNode *N)
void SelectVAlignAddr(SDNode *N)
void SelectVAlign(SDNode *N)
MachineSDNode * getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT)
These are used for target selectors to create a new node with specified return type(s), MachineInstr opcode, and operands.
const HexagonRegisterInfo * getRegisterInfo() const override
void SelectTypecast(SDNode *N)
void SelectIndexedLoad(LoadSDNode *LD, const SDLoc &dl)
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
bool SelectNewCircIntrinsic(SDNode *IntN)
Generate a machine instruction node for the new circlar buffer intrinsics.
bool SelectBrevLdIntrinsic(SDNode *IntN)
SDNode * StoreInstrForLoadIntrinsic(MachineSDNode *LoadN, SDNode *IntN)
This class is used to represent ISD::STORE nodes.
void SelectConstantFP(SDNode *N)
CodeGenOpt::Level OptLevel
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
bool SelectAnyImm0(SDValue &N, SDValue &R)
bool SelectAnyInt(SDValue &N, SDValue &R)
bool SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, std::vector< SDValue > &OutOps) override
SelectInlineAsmMemoryOperand - Implement addressing mode selection for inline asm expressions...
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
void SelectZeroExtend(SDNode *N)
void SelectLoad(SDNode *N)
bool SelectAnyImm2(SDValue &N, SDValue &R)
void SelectQ2V(SDNode *N)
void SelectIndexedStore(StoreSDNode *ST, const SDLoc &dl)
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
bool SelectAddrGA(SDValue &N, SDValue &R)
bool ComplexPatternFuncMutatesDAG() const override
Return true if complex patterns for this target can mutate the DAG.
void SelectSHL(SDNode *N)
bool SelectGlobalAddress(SDValue &N, SDValue &R, bool UseGP, uint32_t LogAlign)
void SelectIntrinsicWChain(SDNode *N)
void SelectD2P(SDNode *N)
An SDNode that represents everything that will be needed to construct a MachineInstr.
This is an abstract virtual class for memory operations.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
HexagonDAGToDAGISel(HexagonTargetMachine &tm, CodeGenOpt::Level OptLevel)
void SelectConstant(SDNode *N)
Represents one node in the SelectionDAG.
SelectionDAGISel - This is the common base class used for SelectionDAG-based pattern-matching instruc...
bool SelectAnyImmediate(SDValue &N, SDValue &R, uint32_t LogAlign)
void SelectStore(SDNode *N)
void SelectAddSubCarry(SDNode *N)
bool SelectAnyImm3(SDValue &N, SDValue &R)
bool SelectAnyImm1(SDValue &N, SDValue &R)
bool SelectAddrGP(SDValue &N, SDValue &R)
bool tryLoadOfLoadIntrinsic(LoadSDNode *N)
void SelectV65Gather(SDNode *N)
bool SelectAnyImm(SDValue &N, SDValue &R)
void PreprocessISelDAG() override
PreprocessISelDAG - This hook allows targets to hack on the graph before instruction selection starts...
LLVM Value Representation.
const HexagonInstrInfo * getInstrInfo() const override
StringRef - Represent a constant reference to a string, i.e.
void SelectHVXDualOutput(SDNode *N)
MachineSDNode * LoadInstrForLoadIntrinsic(SDNode *IntN)
void Select(SDNode *N) override
Main hook for targets to transform nodes into machine nodes.
void SelectV65GatherPred(SDNode *N)
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
This class is used to represent ISD::LOAD nodes.