LLVM 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
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
}
 

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 381 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 

Definition at line 392 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 427 of file SelectionDAGNodes.h.

Member Function Documentation

◆ copyFMF()

void llvm::SDNodeFlags::copyFMF ( const FPMathOperator FPMO)
inline

◆ hasAllowContract()

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

Definition at line 468 of file SelectionDAGNodes.h.

References AllowContract.

◆ hasAllowReassociation()

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

Definition at line 470 of file SelectionDAGNodes.h.

References AllowReassociation.

◆ hasAllowReciprocal()

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

Definition at line 467 of file SelectionDAGNodes.h.

References AllowReciprocal.

◆ hasApproximateFuncs()

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

Definition at line 469 of file SelectionDAGNodes.h.

References ApproximateFuncs.

◆ hasDisjoint()

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

Definition at line 461 of file SelectionDAGNodes.h.

References Disjoint.

◆ hasExact()

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

Definition at line 460 of file SelectionDAGNodes.h.

References Exact.

◆ hasNoFPExcept()

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

◆ hasNoInfs()

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

Definition at line 465 of file SelectionDAGNodes.h.

References NoInfs.

◆ hasNoNaNs()

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

Definition at line 464 of file SelectionDAGNodes.h.

References NoNaNs.

◆ hasNonNeg()

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

Definition at line 463 of file SelectionDAGNodes.h.

References NonNeg.

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

◆ hasNoSignedWrap()

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

Definition at line 459 of file SelectionDAGNodes.h.

References NoSignedWrap.

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

◆ hasNoSignedZeros()

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

Definition at line 466 of file SelectionDAGNodes.h.

References NoSignedZeros.

Referenced by combineFneg(), and PerformFAddVSelectCombine().

◆ hasNoUnsignedWrap()

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

Definition at line 458 of file SelectionDAGNodes.h.

References NoUnsignedWrap.

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

◆ hasSameSign()

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

Definition at line 462 of file SelectionDAGNodes.h.

References SameSign.

◆ hasUnpredictable()

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

Definition at line 472 of file SelectionDAGNodes.h.

References Unpredictable.

◆ operator&=()

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

Definition at line 477 of file SelectionDAGNodes.h.

◆ operator==()

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

Definition at line 474 of file SelectionDAGNodes.h.

References llvm::Other.

◆ operator|=()

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

Definition at line 478 of file SelectionDAGNodes.h.

◆ setAllowContract()

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

Definition at line 451 of file SelectionDAGNodes.h.

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

◆ setAllowReassociation()

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

Definition at line 453 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setAllowReciprocal()

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

Definition at line 450 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setApproximateFuncs()

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

Definition at line 452 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setDisjoint()

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

Definition at line 444 of file SelectionDAGNodes.h.

◆ setExact()

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

Definition at line 443 of file SelectionDAGNodes.h.

◆ setNoFPExcept()

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

Definition at line 454 of file SelectionDAGNodes.h.

◆ setNoInfs()

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

Definition at line 448 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNoNaNs()

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

Definition at line 447 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNonNeg()

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

Definition at line 446 of file SelectionDAGNodes.h.

◆ setNoSignedWrap()

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

Definition at line 442 of file SelectionDAGNodes.h.

◆ setNoSignedZeros()

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

Definition at line 449 of file SelectionDAGNodes.h.

Referenced by copyFMF().

◆ setNoUnsignedWrap()

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

Definition at line 441 of file SelectionDAGNodes.h.

◆ setSameSign()

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

Definition at line 445 of file SelectionDAGNodes.h.

◆ setUnpredictable()

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

Definition at line 455 of file SelectionDAGNodes.h.

Friends And Related Function Documentation

◆ SDNode

friend class SDNode
friend

Definition at line 383 of file SelectionDAGNodes.h.


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