LLVM: llvm::DAGTypeLegalizer Class Reference (original) (raw)

This takes an arbitrary SelectionDAG as input and hacks on it until only value types the target machine can handle are left. More...

#include "[CodeGen/SelectionDAG/LegalizeTypes.h](LegalizeTypes%5F8h%5Fsource.html)"

Public Types
enum NodeIdFlags { ReadyToProcess = 0 , NewNode = -1 , Unanalyzed = -2 , Processed = -3 }
This pass uses the NodeId on the SDNodes to hold information about the state of the node. More...
Public Member Functions
DAGTypeLegalizer (SelectionDAG &dag)
bool run ()
This is the main entry point for the type legalizer.
void NoteDeletion (SDNode *Old, SDNode *New)
SelectionDAG & getDAG () const

Detailed Description

This takes an arbitrary SelectionDAG as input and hacks on it until only value types the target machine can handle are left.

This involves promoting small sizes to large sizes or splitting up large values into small values.

Definition at line 31 of file LegalizeTypes.h.

Member Enumeration Documentation

NodeIdFlags

This pass uses the NodeId on the SDNodes to hold information about the state of the node.

The enum has all the values.

Enumerator
ReadyToProcess All operands have been processed, so this node is ready to be handled.
NewNode This is a new node, not before seen, that was created in the process of legalizing some other node.
Unanalyzed This node's ID needs to be set to the number of its unprocessed operands.
Processed This is a node that has already been processed.

Definition at line 37 of file LegalizeTypes.h.

Constructor & Destructor Documentation

llvm::DAGTypeLegalizer::DAGTypeLegalizer ( SelectionDAG & dag) inlineexplicit

Member Function Documentation

getDAG()

SelectionDAG & llvm::DAGTypeLegalizer::getDAG ( ) const inline

NoteDeletion()

void llvm::DAGTypeLegalizer::NoteDeletion ( SDNode * Old, SDNode * New ) inline

run()

bool DAGTypeLegalizer::run ( )

This is the main entry point for the type legalizer.

This does a top-down traversal of the dag, legalizing types as it goes. Returns "true" if it made any changes.

Definition at line 200 of file LegalizeTypes.cpp.

References AbstractManglingParser< Derived, Alloc >::NumOps, assert(), Changed, llvm::dbgs(), Node::dump(), EnableExpensiveChecks, llvm::Failed(), llvm::SDNodeFlags::FastMathFlags, llvm::User::getNumOperands(), llvm::HandleSDNode::getValue(), LLVM_DEBUG, llvm_unreachable, N, NewNode, Processed, ReadyToProcess, llvm::report_fatal_error(), SDValue(), llvm::SDNode::setNodeId(), llvm::TargetLoweringBase::TypeExpandFloat, llvm::TargetLoweringBase::TypeExpandInteger, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypePromoteFloat, llvm::TargetLoweringBase::TypePromoteInteger, llvm::TargetLoweringBase::TypeScalarizeScalableVector, llvm::TargetLoweringBase::TypeScalarizeVector, llvm::TargetLoweringBase::TypeSoftenFloat, llvm::TargetLoweringBase::TypeSoftPromoteHalf, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, and Unanalyzed.

Referenced by llvm::SelectionDAG::LegalizeTypes().


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