LLVM 19.0.0git
Public Member Functions | List of all members
llvm::SDLoc Class Reference

Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation functions. More...

#include "llvm/CodeGen/SelectionDAGNodes.h"

Public Member Functions

 SDLoc ()=default
 
 SDLoc (const SDNode *N)
 
 SDLoc (const SDValue V)
 
 SDLoc (const Instruction *I, int Order)
 
unsigned getIROrder () const
 
const DebugLocgetDebugLoc () const
 

Detailed Description

Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation functions.

When an SDNode is created from the DAGBuilder, the DebugLoc is extracted from the original Instruction, and IROrder is the ordinal position of the instruction. When an SDNode is created after the DAG is being built, both DebugLoc and the IROrder are propagated from the original SDNode. So SDLoc class provides two constructors besides the default one, one to be used by the DAGBuilder, the other to be used by others.

Definition at line 1128 of file SelectionDAGNodes.h.

Constructor & Destructor Documentation

◆ SDLoc() [1/4]

llvm::SDLoc::SDLoc ( )
default

◆ SDLoc() [2/4]

llvm::SDLoc::SDLoc ( const SDNode N)
inline

Definition at line 1135 of file SelectionDAGNodes.h.

References DL.

◆ SDLoc() [3/4]

llvm::SDLoc::SDLoc ( const SDValue  V)
inline

Definition at line 1136 of file SelectionDAGNodes.h.

◆ SDLoc() [4/4]

llvm::SDLoc::SDLoc ( const Instruction I,
int  Order 
)
inline

Definition at line 1137 of file SelectionDAGNodes.h.

References assert(), DL, and I.

Member Function Documentation

◆ getDebugLoc()

const DebugLoc & llvm::SDLoc::getDebugLoc ( ) const
inline

◆ getIROrder()

unsigned llvm::SDLoc::getIROrder ( ) const
inline

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