LLVM 20.0.0git
|
#include "llvm/Transforms/IPO/StripSymbols.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/TypeFinder.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Functions | |
static bool | OnlyUsedBy (Value *V, Value *Usr) |
OnlyUsedBy - Return true if V is only used by Usr. | |
static void | RemoveDeadConstant (Constant *C) |
static void | StripSymtab (ValueSymbolTable &ST, bool PreserveDbgInfo) |
static void | StripTypeNames (Module &M, bool PreserveDbgInfo) |
static void | findUsedValues (GlobalVariable *LLVMUsed, SmallPtrSetImpl< const GlobalValue * > &UsedValues) |
Find values that are marked as llvm.used. | |
static bool | StripSymbolNames (Module &M, bool PreserveDbgInfo) |
StripSymbolNames - Strip symbol names. | |
static bool | stripDebugDeclareImpl (Module &M) |
static bool | stripDeadDebugInfoImpl (Module &M) |
Variables | |
static cl::opt< bool > | StripGlobalConstants ("strip-global-constants", cl::init(false), cl::Hidden, cl::desc("Removes debug compile units which reference " "to non-existing global constants")) |
|
static |
Find values that are marked as llvm.used.
Definition at line 105 of file StripSymbols.cpp.
References llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::Value::stripPointerCasts().
Referenced by StripSymbolNames().
OnlyUsedBy - Return true if V is only used by Usr.
Definition at line 46 of file StripSymbols.cpp.
Referenced by RemoveDeadConstant().
|
static |
Definition at line 54 of file StripSymbols.cpp.
References assert(), llvm::CallingConv::C, OnlyUsedBy(), Operands, and RemoveDeadConstant().
Referenced by RemoveDeadConstant(), and stripDebugDeclareImpl().
Definition at line 183 of file StripSymbols.cpp.
References llvm::NamedMDNode::addOperand(), llvm::CallingConv::C, llvm::SmallVectorImpl< T >::clear(), llvm::NamedMDNode::clearOperands(), llvm::DebugInfoFinder::compile_units(), llvm::SmallVectorBase< Size_T >::empty(), F, llvm::MDTuple::get(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::SmallVectorImpl< T >::insert(), instructions, llvm::DebugInfoFinder::processInstruction(), llvm::DebugInfoFinder::processSubprogram(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and StripGlobalConstants.
Referenced by llvm::StripDeadDebugInfoPass::run().
Definition at line 145 of file StripSymbols.cpp.
References assert(), llvm::CallingConv::C, llvm::Function::eraseFromParent(), llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemoveDeadConstant(), llvm::Value::use_empty(), and llvm::Value::user_back().
Referenced by llvm::StripDebugDeclarePass::run().
StripSymbolNames - Strip symbol names.
Definition at line 119 of file StripSymbols.cpp.
References llvm::SmallPtrSetImpl< PtrType >::contains(), findUsedValues(), I, StripSymtab(), and StripTypeNames().
Referenced by llvm::StripSymbolsPass::run(), and llvm::StripNonDebugSymbolsPass::run().
|
static |
Definition at line 77 of file StripSymbols.cpp.
Referenced by StripSymbolNames().
Definition at line 90 of file StripSymbols.cpp.
References llvm::TypeFinder::run().
Referenced by StripSymbolNames().
|
static |
Referenced by stripDeadDebugInfoImpl().