LLVM 20.0.0git
|
#include "llvm/Transforms/Utils/SplitModule.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <algorithm>
#include <cassert>
#include <iterator>
#include <memory>
#include <queue>
#include <utility>
#include <vector>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "split-module" |
Functions | |
static void | addNonConstUser (ClusterMapType &GVtoClusterMap, const GlobalValue *GV, const User *U) |
static void | addAllGlobalValueUsers (ClusterMapType &GVtoClusterMap, const GlobalValue *GV, const Value *V) |
static const GlobalObject * | getGVPartitioningRoot (const GlobalValue *GV) |
static void | findPartitions (Module &M, ClusterIDMapType &ClusterIDMap, unsigned N) |
static void | externalize (GlobalValue *GV) |
static bool | isInPartition (const GlobalValue *GV, unsigned I, unsigned N) |
#define DEBUG_TYPE "split-module" |
Definition at line 50 of file SplitModule.cpp.
|
static |
Definition at line 87 of file SplitModule.cpp.
References addNonConstUser(), llvm::SmallVectorImpl< T >::append(), llvm::SmallVectorBase< Size_T >::empty(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::user_begin(), and llvm::Value::user_end().
Referenced by findPartitions().
|
static |
Definition at line 72 of file SplitModule.cpp.
References assert(), F, I, and llvm_unreachable.
Referenced by addAllGlobalValueUsers().
|
static |
Definition at line 222 of file SplitModule.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::hasLocalLinkage(), llvm::Value::hasName(), llvm::GlobalValue::HiddenVisibility, llvm::GlobalValue::setLinkage(), llvm::Value::setName(), and llvm::GlobalValue::setVisibility().
Referenced by llvm::SplitModule().
Definition at line 115 of file SplitModule.cpp.
References addAllGlobalValueUsers(), llvm::CallingConv::C, llvm::dbgs(), F, llvm::for_each(), getGVPartitioningRoot(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Constant::isConstantUsed(), LLVM_DEBUG, llvm::BlockAddress::lookup(), MI, N, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::sort().
Referenced by llvm::SplitModule().
|
static |
Definition at line 104 of file SplitModule.cpp.
References llvm::GlobalValue::getAliaseeObject().
Referenced by findPartitions(), and isInPartition().
|
static |
Definition at line 235 of file SplitModule.cpp.
References llvm::CallingConv::C, llvm::GlobalValue::getComdat(), getGVPartitioningRoot(), llvm::Value::getName(), H, I, N, and Name.
Referenced by llvm::SplitModule().