|
LLVM
4.0.0
|
#include "llvm/Transforms/Scalar/ConstantHoisting.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/IR/Constants.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Scalar.h"#include <tuple>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "consthoist" |
Functions | |
| STATISTIC (NumConstantsHoisted,"Number of constants hoisted") | |
| STATISTIC (NumConstantsRebased,"Number of constants rebased") | |
| INITIALIZE_PASS_BEGIN (ConstantHoistingLegacyPass,"consthoist","Constant Hoisting", false, false) INITIALIZE_PASS_END(ConstantHoistingLegacyPass | |
| static llvm::Optional< APInt > | calculateOffsetDiff (APInt V1, APInt V2) |
| static bool | updateOperand (Instruction *Inst, unsigned Idx, Instruction *Mat) |
| Updates the operand at Idx in instruction Inst with the result of instruction Mat. More... | |
Variables | |
| consthoist | |
| Constant | Hoisting |
| Constant | false |
| #define DEBUG_TYPE "consthoist" |
Definition at line 51 of file ConstantHoisting.cpp.
|
static |
Definition at line 292 of file ConstantHoisting.cpp.
References llvm::APInt::getBitWidth(), llvm::APInt::getLimitedValue(), and llvm::None.
| INITIALIZE_PASS_BEGIN | ( | ConstantHoistingLegacyPass | , |
| "consthoist" | , | ||
| "Constant Hoisting" | , | ||
| false | , | ||
| false | |||
| ) |
| STATISTIC | ( | NumConstantsHoisted | , |
| "Number of constants hoisted" | |||
| ) |
| STATISTIC | ( | NumConstantsRebased | , |
| "Number of constants rebased" | |||
| ) |
|
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 incoming basic block is required.
Definition at line 451 of file ConstantHoisting.cpp.
References i, and llvm::User::setOperand().
| consthoist |
Definition at line 87 of file ConstantHoisting.cpp.
| Constant false |
Definition at line 87 of file ConstantHoisting.cpp.
| Constant Hoisting |
Definition at line 87 of file ConstantHoisting.cpp.
1.8.6