LLVM 24.0.0git
TruncInstCombine.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "aggressive-instcombine"

Functions

 STATISTIC (NumExprsReduced, "Number of truncations eliminated by reducing bit " "width of expression graph")
 STATISTIC (NumInstrsReduced, "Number of instructions whose bit width was reduced")
static bool isRelevantOperand (const Instruction *I, unsigned OpNo)
 Return whether operand OpNo of I is reducible.
static void getRelevantOperands (Instruction *I, SmallVectorImpl< Value * > &Ops)
 Given an instruction and a container, it fills all the relevant operands of that instruction, with respect to the Trunc expression graph optimizaton.
static TypegetReducedType (Value *V, Type *Ty)
 Given a reduced scalar type Ty and a V value, return a reduced type for V, according to its type, if it vector type, return the vector version of Ty, otherwise return Ty.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aggressive-instcombine"

Definition at line 39 of file TruncInstCombine.cpp.

Function Documentation

◆ getReducedType()

Type * getReducedType ( Value * V,
Type * Ty )
static

Given a reduced scalar type Ty and a V value, return a reduced type for V, according to its type, if it vector type, return the vector version of Ty, otherwise return Ty.

Definition at line 362 of file TruncInstCombine.cpp.

References assert(), llvm::dyn_cast(), and llvm::VectorType::get().

◆ getRelevantOperands()

void getRelevantOperands ( Instruction * I,
SmallVectorImpl< Value * > & Ops )
static

Given an instruction and a container, it fills all the relevant operands of that instruction, with respect to the Trunc expression graph optimizaton.

Definition at line 83 of file TruncInstCombine.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, I, and isRelevantOperand().

◆ isRelevantOperand()

bool isRelevantOperand ( const Instruction * I,
unsigned OpNo )
static

Return whether operand OpNo of I is reducible.

Definition at line 47 of file TruncInstCombine.cpp.

References I, llvm_unreachable, and Opc.

Referenced by getRelevantOperands().

◆ STATISTIC() [1/2]

STATISTIC ( NumExprsReduced ,
"Number of truncations eliminated by reducing bit " "width of expression graph"  )

◆ STATISTIC() [2/2]

STATISTIC ( NumInstrsReduced ,
"Number of instructions whose bit width was reduced"  )