LLVM 23.0.0git
X86SelectionDAGInfo.h
Go to the documentation of this file.
1//===-- X86SelectionDAGInfo.h - X86 SelectionDAG Info -----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the X86 subclass for SelectionDAGTargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_X86_X86SELECTIONDAGINFO_H
14#define LLVM_LIB_TARGET_X86_X86SELECTIONDAGINFO_H
15
17
18#define GET_SDNODE_ENUM
19#include "X86GenSDNodeInfo.inc"
20
21namespace llvm {
22namespace X86ISD {
23
24enum NodeType : unsigned {
25 /// The same as ISD::CopyFromReg except that this node makes it explicit
26 /// that it may lower to an x87 FPU stack pop. Optimizations should be more
27 /// cautious when handling this node than a normal CopyFromReg to avoid
28 /// removing a required FPU stack pop. A key requirement is optimizations
29 /// should not optimize any users of a chain that contains a
30 /// POP_FROM_X87_REG to use a chain from a point earlier than the
31 /// POP_FROM_X87_REG (which may remove a required FPU stack pop).
32 POP_FROM_X87_REG = X86ISD::GENERATED_OPCODE_END,
33
34 /// On Darwin, this node represents the result of the popl
35 /// at function entry, used for PIC code.
37
38 // SSE42 string comparisons.
39 // These nodes produce 3 results, index, mask, and flags. X86ISelDAGToDAG
40 // will emit one or two instructions based on which results are used. If
41 // flags and index/mask this allows us to use a single instruction since
42 // we won't have to pick and opcode for flags. Instead we can rely on the
43 // DAG to CSE everything and decide at isel.
46
47 // Compare and swap.
50
51 // X86 specific gather and scatter
54
55 // Key locker nodes that produce flags.
61};
62
63} // namespace X86ISD
64
66 /// Returns true if it is possible for the base register to conflict with the
67 /// given set of clobbers for a memory intrinsic.
68 bool isBaseRegConflictPossible(SelectionDAG &DAG,
69 ArrayRef<MCPhysReg> ClobberSet) const;
70
71public:
73
74 const char *getTargetNodeName(unsigned Opcode) const override;
75
76 bool isTargetMemoryOpcode(unsigned Opcode) const override;
77
78 void verifyTargetNode(const SelectionDAG &DAG,
79 const SDNode *N) const override;
80
82 SDValue Chain, SDValue Dst, SDValue Src,
83 SDValue Size, Align Alignment,
84 bool isVolatile, bool AlwaysInline,
85 MachinePointerInfo DstPtrInfo) const override;
86
88 SDValue Chain, SDValue Dst, SDValue Src,
89 SDValue Size, Align Alignment,
90 bool isVolatile, bool AlwaysInline,
91 MachinePointerInfo DstPtrInfo,
92 MachinePointerInfo SrcPtrInfo) const override;
93};
94
95} // namespace llvm
96
97#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
SelectionDAGGenTargetInfo(const SDNodeInfo &GenNodeInfo)
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
bool isTargetMemoryOpcode(unsigned Opcode) const override
Returns true if a node with the given target-specific opcode has a memory operand.
void verifyTargetNode(const SelectionDAG &DAG, const SDNode *N) const override
Checks that the given target-specific node is valid. Aborts if it is not.
const char * getTargetNodeName(unsigned Opcode) const override
Returns the name of the given target-specific opcode, suitable for debug printing.
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override
Emit target-specific code that performs a memcpy.
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo) const override
Emit target-specific code that performs a memset.
@ GlobalBaseReg
On Darwin, this node represents the result of the popl at function entry, used for PIC code.
@ POP_FROM_X87_REG
The same as ISD::CopyFromReg except that this node makes it explicit that it may lower to an x87 FPU ...
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
#define N
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39
This class contains a discriminated union of information about pointers in memory operands,...