LLVM 20.0.0git
|
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"
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 |
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.
This pass uses the NodeId on the SDNodes to hold information about the state of the node.
The enum has all the values.
Definition at line 37 of file LegalizeTypes.h.
|
inlineexplicit |
Definition at line 168 of file LegalizeTypes.h.
|
inline |
Definition at line 206 of file LegalizeTypes.h.
Definition at line 178 of file LegalizeTypes.h.
References assert(), and llvm::SDNode::getNumValues().
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 201 of file LegalizeTypes.cpp.
References llvm::SelectionDAG::allnodes(), assert(), llvm::dbgs(), EnableExpensiveChecks, llvm::Failed(), llvm::User::getNumOperands(), llvm::SelectionDAG::getRoot(), LLVM_DEBUG, llvm_unreachable, N, NewNode, Processed, ReadyToProcess, llvm::SelectionDAG::RemoveDeadNodes(), llvm::report_fatal_error(), llvm::SelectionDAG::setRoot(), 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().