LLVM 22.0.0git
llvm::SDNodeFlags Struct Reference

These are IR-level optimization flags that may be propagated to SDNodes. More...

#include "llvm/CodeGen/SelectionDAGNodes.h"

Public Types

enum  : unsigned {
  None = 0 , NoUnsignedWrap = 1 << 0 , NoSignedWrap = 1 << 1 , NoWrap = NoUnsignedWrap | NoSignedWrap ,
  Exact = 1 << 2 , Disjoint = 1 << 3 , NonNeg = 1 << 4 , NoNaNs = 1 << 5 ,
  NoInfs = 1 << 6 , NoSignedZeros = 1 << 7 , AllowReciprocal = 1 << 8 , AllowContract = 1 << 9 ,
  ApproximateFuncs = 1 << 10 , AllowReassociation = 1 << 11 , NoFPExcept = 1 << 12 , Unpredictable = 1 << 13 ,
  SameSign = 1 << 14 , PoisonGeneratingFlags , FastMathFlags
}

Public Member Functions

 SDNodeFlags (unsigned Flags=SDNodeFlags::None)
 Default constructor turns off all optimization flags.
void copyFMF (const FPMathOperator &FPMO)
 Propagate the fast-math-flags from an IR FPMathOperator.
void setNoUnsignedWrap (bool b)
void setNoSignedWrap (bool b)
void setExact (bool b)
void setDisjoint (bool b)
void setSameSign (bool b)
void setNonNeg (bool b)
void setNoNaNs (bool b)
void setNoInfs (bool b)
void setNoSignedZeros (bool b)
void setAllowReciprocal (bool b)
void setAllowContract (bool b)
void setApproximateFuncs (bool b)
void setAllowReassociation (bool b)
void setNoFPExcept (bool b)
void setUnpredictable (bool b)
bool hasNoUnsignedWrap () const
bool hasNoSignedWrap () const
bool hasExact () const
bool hasDisjoint () const
bool hasSameSign () const
bool hasNonNeg () const
bool hasNoNaNs () const
bool hasNoInfs () const
bool hasNoSignedZeros () const
bool hasAllowReciprocal () const
bool hasAllowContract () const
bool hasApproximateFuncs () const
bool hasAllowReassociation () const
bool hasNoFPExcept () const
bool hasUnpredictable () const
bool operator== (const SDNodeFlags &Other) const
void operator&= (const SDNodeFlags &OtherFlags)
void operator|= (const SDNodeFlags &OtherFlags)

Friends

class SDNode

Detailed Description

These are IR-level optimization flags that may be propagated to SDNodes.

TODO: This data structure should be shared by the IR optimizer and the the backend.

Definition at line 384 of file SelectionDAGNodes.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
None 
NoUnsignedWrap 
NoSignedWrap 
NoWrap 
Exact 
Disjoint 
NonNeg 
NoNaNs 
NoInfs 
NoSignedZeros 
AllowReciprocal 
AllowContract 
ApproximateFuncs 
AllowReassociation 
NoFPExcept 
Unpredictable 
SameSign 
PoisonGeneratingFlags 
FastMathFlags 

Definition at line 395 of file SelectionDAGNodes.h.

Constructor & Destructor Documentation

◆ SDNodeFlags()

llvm::SDNodeFlags::SDNodeFlags ( unsigned Flags = SDNodeFlags::None)
inline

Default constructor turns off all optimization flags.

Definition at line 432 of file SelectionDAGNodes.h.

References None.

Referenced by operator&=(), operator==(), and operator|=().

Member Function Documentation

◆ copyFMF()

◆ hasAllowContract()

bool llvm::SDNodeFlags::hasAllowContract ( ) const
inline

◆ hasAllowReassociation()

bool llvm::SDNodeFlags::hasAllowReassociation ( ) const
inline

Definition at line 475 of file SelectionDAGNodes.h.

References AllowReassociation.

◆ hasAllowReciprocal()

bool llvm::SDNodeFlags::hasAllowReciprocal ( ) const
inline

Definition at line 472 of file SelectionDAGNodes.h.

References AllowReciprocal.

◆ hasApproximateFuncs()

bool llvm::SDNodeFlags::hasApproximateFuncs ( ) const
inline

Definition at line 474 of file SelectionDAGNodes.h.

References ApproximateFuncs.

◆ hasDisjoint()

bool llvm::SDNodeFlags::hasDisjoint ( ) const
inline

Definition at line 466 of file SelectionDAGNodes.h.

References Disjoint.

◆ hasExact()

bool llvm::SDNodeFlags::hasExact ( ) const
inline

Definition at line 465 of file SelectionDAGNodes.h.

References Exact.

◆ hasNoFPExcept()

bool llvm::SDNodeFlags::hasNoFPExcept ( ) const
inline

Definition at line 476 of file SelectionDAGNodes.h.

References NoFPExcept.

Referenced by llvm::VPMatchContext::match().

◆ hasNoInfs()

bool llvm::SDNodeFlags::hasNoInfs ( ) const
inline

Definition at line 470 of file SelectionDAGNodes.h.

References NoInfs.

Referenced by eliminateFPCastPair().

◆ hasNoNaNs()

bool llvm::SDNodeFlags::hasNoNaNs ( ) const
inline

Definition at line 469 of file SelectionDAGNodes.h.

References NoNaNs.

Referenced by eliminateFPCastPair().

◆ hasNonNeg()

bool llvm::SDNodeFlags::hasNonNeg ( ) const
inline

Definition at line 468 of file SelectionDAGNodes.h.

References NonNeg.

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

◆ hasNoSignedWrap()

bool llvm::SDNodeFlags::hasNoSignedWrap ( ) const
inline

Definition at line 464 of file SelectionDAGNodes.h.

References NoSignedWrap.

Referenced by llvm::TargetLowering::SimplifySetCC().

◆ hasNoSignedZeros()

bool llvm::SDNodeFlags::hasNoSignedZeros ( ) const
inline

Definition at line 471 of file SelectionDAGNodes.h.

References NoSignedZeros.

Referenced by combineFneg(), and PerformFAddVSelectCombine().

◆ hasNoUnsignedWrap()

bool llvm::SDNodeFlags::hasNoUnsignedWrap ( ) const
inline

◆ hasSameSign()

bool llvm::SDNodeFlags::hasSameSign ( ) const
inline

Definition at line 467 of file SelectionDAGNodes.h.

References SameSign.

◆ hasUnpredictable()

bool llvm::SDNodeFlags::hasUnpredictable ( ) const
inline

Definition at line 477 of file SelectionDAGNodes.h.

References Unpredictable.

◆ operator&=()

void llvm::SDNodeFlags::operator&= ( const SDNodeFlags & OtherFlags)
inline

Definition at line 482 of file SelectionDAGNodes.h.

References SDNodeFlags().

◆ operator==()

bool llvm::SDNodeFlags::operator== ( const SDNodeFlags & Other) const
inline

Definition at line 479 of file SelectionDAGNodes.h.

References llvm::Other, and SDNodeFlags().

◆ operator|=()

void llvm::SDNodeFlags::operator|= ( const SDNodeFlags & OtherFlags)
inline

Definition at line 483 of file SelectionDAGNodes.h.

References SDNodeFlags().

◆ setAllowContract()

void llvm::SDNodeFlags::setAllowContract ( bool b)
inline

Definition at line 456 of file SelectionDAGNodes.h.

Referenced by copyFMF(), and llvm::AMDGPUTargetLowering::lowerFEXP().

◆ setAllowReassociation()

void llvm::SDNodeFlags::setAllowReassociation ( bool b)
inline

Definition at line 458 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setAllowReciprocal()

void llvm::SDNodeFlags::setAllowReciprocal ( bool b)
inline

Definition at line 455 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setApproximateFuncs()

void llvm::SDNodeFlags::setApproximateFuncs ( bool b)
inline

Definition at line 457 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setDisjoint()

void llvm::SDNodeFlags::setDisjoint ( bool b)
inline

Definition at line 449 of file SelectionDAGNodes.h.

◆ setExact()

void llvm::SDNodeFlags::setExact ( bool b)
inline

◆ setNoFPExcept()

void llvm::SDNodeFlags::setNoFPExcept ( bool b)
inline

Definition at line 459 of file SelectionDAGNodes.h.

Referenced by convertFPToInt(), and convertIntToFP().

◆ setNoInfs()

void llvm::SDNodeFlags::setNoInfs ( bool b)
inline

Definition at line 453 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNoNaNs()

void llvm::SDNodeFlags::setNoNaNs ( bool b)
inline

Definition at line 452 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNonNeg()

void llvm::SDNodeFlags::setNonNeg ( bool b)
inline

Definition at line 451 of file SelectionDAGNodes.h.

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

◆ setNoSignedWrap()

void llvm::SDNodeFlags::setNoSignedWrap ( bool b)
inline

◆ setNoSignedZeros()

void llvm::SDNodeFlags::setNoSignedZeros ( bool b)
inline

Definition at line 454 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNoUnsignedWrap()

void llvm::SDNodeFlags::setNoUnsignedWrap ( bool b)
inline

Definition at line 446 of file SelectionDAGNodes.h.

◆ setSameSign()

void llvm::SDNodeFlags::setSameSign ( bool b)
inline

Definition at line 450 of file SelectionDAGNodes.h.

◆ setUnpredictable()

void llvm::SDNodeFlags::setUnpredictable ( bool b)
inline

Definition at line 460 of file SelectionDAGNodes.h.

Referenced by llvm::SelectionDAGBuilder::visitSwitchCase().

◆ SDNode

friend class SDNode
friend

Definition at line 386 of file SelectionDAGNodes.h.

References B(), and SDNode.

Referenced by SDNode.


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