LLVM 20.0.0git
|
#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/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Local.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)") | |
STATISTIC (NumSExt2ZExt, "Number of sign extension instructions converted to zero extension") | |
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. | |
static bool | bitTrackingDCE (Function &F, DemandedBits &DB) |
|
static |
Definition at line 96 of file BDCE.cpp.
References clearAssumptionsOfUsers(), llvm::APInt::countl_zero(), llvm::IRBuilderBase::CreateZExt(), llvm::dbgs(), F, I, instructions, llvm::APInt::intersects(), llvm::APInt::isAllOnes(), llvm::APInt::isSubsetOf(), LLVM_DEBUG, llvm::PatternMatch::m_APInt(), llvm::PatternMatch::match(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::reverse(), llvm::salvageDebugInfo(), and llvm::wouldInstructionBeTriviallyDead().
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 44 of file BDCE.cpp.
References assert(), llvm::Instruction::dropPoisonGeneratingAnnotations(), llvm::SmallVectorBase< Size_T >::empty(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::Value::users().
Referenced by bitTrackingDCE().
STATISTIC | ( | NumRemoved | , |
"Number of instructions removed (unused)" | |||
) |
STATISTIC | ( | NumSExt2ZExt | , |
"Number of sign extension instructions converted to zero extension" | |||
) |
STATISTIC | ( | NumSimplified | , |
"Number of instructions trivialized (dead bits)" | |||
) |