LLVM  10.0.0
Public Member Functions | Public Attributes | List of all members
DivRemPairWorklistEntry Struct Reference

A thin wrapper to store two values that we matched as div-rem pair. More...

Collaboration diagram for DivRemPairWorklistEntry:
[legend]

Public Member Functions

 DivRemPairWorklistEntry (Instruction *DivInst_, Instruction *RemInst_)
 
Type * getType () const
 The type for this pair, identical for both the div and rem. More...
 
bool isSigned () const
 Is this pair signed or unsigned? More...
 
Value * getDividend () const
 In this pair, what are the divident and divisor? More...
 
Value * getDivisor () const
 
bool isRemExpanded () const
 

Public Attributes

AssertingVH< Instruction > DivInst
 The actual udiv/sdiv instruction. Source of truth. More...
 
AssertingVH< Instruction > RemInst
 The instruction that we have matched as a remainder instruction. More...
 

Detailed Description

A thin wrapper to store two values that we matched as div-rem pair.

We want this extra indirection to avoid dealing with RAUW'ing the map keys.

Definition at line 76 of file DivRemPairs.cpp.

Constructor & Destructor Documentation

◆ DivRemPairWorklistEntry()

DivRemPairWorklistEntry::DivRemPairWorklistEntry ( Instruction *  DivInst_,
Instruction *  RemInst_ 
)
inline

Definition at line 84 of file DivRemPairs.cpp.

References assert(), llvm::Instruction::getOpcode(), and llvm::Value::getType().

Member Function Documentation

◆ getDividend()

Value* DivRemPairWorklistEntry::getDividend ( ) const
inline

In this pair, what are the divident and divisor?

Definition at line 101 of file DivRemPairs.cpp.

References llvm::User::getOperand().

◆ getDivisor()

Value* DivRemPairWorklistEntry::getDivisor ( ) const
inline

Definition at line 102 of file DivRemPairs.cpp.

References llvm::User::getOperand().

◆ getType()

Type* DivRemPairWorklistEntry::getType ( ) const
inline

The type for this pair, identical for both the div and rem.

Definition at line 95 of file DivRemPairs.cpp.

References llvm::Value::getType().

◆ isRemExpanded()

bool DivRemPairWorklistEntry::isRemExpanded ( ) const
inline

Definition at line 104 of file DivRemPairs.cpp.

References llvm::Instruction::getOpcode().

◆ isSigned()

bool DivRemPairWorklistEntry::isSigned ( ) const
inline

Is this pair signed or unsigned?

Definition at line 98 of file DivRemPairs.cpp.

References llvm::Instruction::getOpcode().

Member Data Documentation

◆ DivInst

AssertingVH<Instruction> DivRemPairWorklistEntry::DivInst

The actual udiv/sdiv instruction. Source of truth.

Definition at line 78 of file DivRemPairs.cpp.

◆ RemInst

AssertingVH<Instruction> DivRemPairWorklistEntry::RemInst

The instruction that we have matched as a remainder instruction.

Should only be used as Value, don't introspect it.

Definition at line 82 of file DivRemPairs.cpp.


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