LLVM API Documentation

Defines | Functions | Variables
ConstantHoisting.cpp File Reference
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include <tuple>
Include dependency graph for ConstantHoisting.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "consthoist"

Functions

 STATISTIC (NumConstantsHoisted,"Number of constants hoisted")
 STATISTIC (NumConstantsRebased,"Number of constants rebased")
 INITIALIZE_PASS_BEGIN (ConstantHoisting,"consthoist","Constant Hoisting", false, false) INITIALIZE_PASS_END(ConstantHoisting
static bool updateOperand (Instruction *Inst, unsigned Idx, Instruction *Mat)
 Updates the operand at Idx in instruction Inst with the result of instruction Mat. If the instruction is a PHI node then special handling for duplicate values form the same incomming basic block is required.

Variables

 consthoist
Constant Hoisting
Constant false

Define Documentation

#define DEBUG_TYPE   "consthoist"

Definition at line 50 of file ConstantHoisting.cpp.


Function Documentation

INITIALIZE_PASS_BEGIN ( ConstantHoisting  ,
"consthoist"  ,
"Constant Hoisting ,
false  ,
false   
)
STATISTIC ( NumConstantsHoisted  ,
"Number of constants hoisted"   
)
STATISTIC ( NumConstantsRebased  ,
"Number of constants rebased"   
)
static bool updateOperand ( Instruction Inst,
unsigned  Idx,
Instruction Mat 
) [static]

Updates the operand at Idx in instruction Inst with the result of instruction Mat. If the instruction is a PHI node then special handling for duplicate values form the same incomming basic block is required.

Returns:
The update will always succeed, but the return value indicated if Mat was used for the update or not.

Definition at line 441 of file ConstantHoisting.cpp.

References llvm::TargetOpcode::PHI, and llvm::User::setOperand().


Variable Documentation

Definition at line 180 of file ConstantHoisting.cpp.

Definition at line 180 of file ConstantHoisting.cpp.

Definition at line 180 of file ConstantHoisting.cpp.