LLVM API Documentation
#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>
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 DEBUG_TYPE "consthoist" |
Definition at line 50 of file ConstantHoisting.cpp.
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.
Definition at line 441 of file ConstantHoisting.cpp.
References llvm::TargetOpcode::PHI, and llvm::User::setOperand().
Definition at line 180 of file ConstantHoisting.cpp.
Definition at line 180 of file ConstantHoisting.cpp.
Definition at line 180 of file ConstantHoisting.cpp.