|
LLVM
5.0.0
|
#include "llvm/Transforms/Scalar/BDCE.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/DemandedBits.h"#include "llvm/Analysis/GlobalsModRef.h"#include "llvm/IR/CFG.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Operator.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Scalar.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "bdce" |
Functions | |
| STATISTIC (NumRemoved,"Number of instructions removed (unused)") | |
| STATISTIC (NumSimplified,"Number of instructions trivialized (dead bits)") | |
| static void | clearAssumptionsOfUsers (Instruction *I, DemandedBits &DB) |
| If an instruction is trivialized (dead), then the chain of users of that instruction may need to be cleared of assumptions that can no longer be guaranteed correct. More... | |
| static bool | bitTrackingDCE (Function &F, DemandedBits &DB) |
| INITIALIZE_PASS_BEGIN (BDCELegacyPass,"bdce","Bit-Tracking Dead Code Elimination", false, false) INITIALIZE_PASS_END(BDCELegacyPass | |
Variables | |
| bdce | |
| Bit Tracking Dead Code | Elimination |
| Bit Tracking Dead Code | false |
|
static |
Definition at line 79 of file BDCE.cpp.
References clearAssumptionsOfUsers(), llvm::dbgs(), DEBUG, llvm::ConstantInt::get(), llvm::APInt::getBoolValue(), llvm::DemandedBits::getDemandedBits(), I, llvm::instructions(), llvm::DemandedBits::isInstructionDead(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and Zero.
Referenced by llvm::BDCEPass::run().
|
static |
If an instruction is trivialized (dead), then the chain of users of that instruction may need to be cleared of assumptions that can no longer be guaranteed correct.
Definition at line 42 of file BDCE.cpp.
References assert(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::Instruction::dropPoisonGeneratingFlags(), llvm::dyn_cast(), llvm::DemandedBits::getDemandedBits(), llvm::Value::getType(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::APInt::isAllOnesValue(), llvm::Type::isIntegerTy(), and llvm::Value::users().
Referenced by bitTrackingDCE().
| INITIALIZE_PASS_BEGIN | ( | BDCELegacyPass | , |
| "bdce" | , | ||
| "Bit-Tracking Dead Code Elimination" | , | ||
| false | , | ||
| false | |||
| ) |
| STATISTIC | ( | NumRemoved | , |
| "Number of instructions removed (unused)" | |||
| ) |
| STATISTIC | ( | NumSimplified | , |
| "Number of instructions trivialized (dead bits)" | |||
| ) |
1.8.6