LLVM  14.0.0git
Macros | Functions
TruncInstCombine.cpp File Reference
#include "AggressiveInstCombineInternal.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/Support/KnownBits.h"
Include dependency graph for TruncInstCombine.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "aggressive-instcombine"
 

Functions

 STATISTIC (NumDAGsReduced, "Number of truncations eliminated by reducing bit width of expression DAG")
 
 STATISTIC (NumInstrsReduced, "Number of instructions whose bit width was reduced")
 
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 dag optimizaton. More...
 
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. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aggressive-instcombine"

Definition at line 40 of file TruncInstCombine.cpp.

Function Documentation

◆ getReducedType()

static 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 349 of file TruncInstCombine.cpp.

References assert(), llvm::VectorType::get(), llvm::Value::getType(), and llvm::Type::isVectorTy().

◆ getRelevantOperands()

static 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 dag optimizaton.

Definition at line 50 of file TruncInstCombine.cpp.

References llvm::MCID::Add, I, llvm_unreachable, and llvm::MCID::Select.

◆ STATISTIC() [1/2]

STATISTIC ( NumDAGsReduced  ,
"Number of truncations eliminated by reducing bit width of expression DAG"   
)

◆ STATISTIC() [2/2]

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