LLVM API Documentation
#include "NVPTXUtilities.h"
#include "NVPTX.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include <algorithm>
#include <cstring>
#include <map>
#include <string>
#include <vector>
#include "llvm/Support/ManagedStatic.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/Support/MutexGuard.h"
Go to the source code of this file.
Typedefs | |
typedef std::map< std::string, std::vector< unsigned > > | key_val_pair_t |
typedef std::map< const GlobalValue *, key_val_pair_t > | global_val_annot_t |
typedef std::map< const Module *, global_val_annot_t > | per_module_annot_t |
Functions | |
static void | cacheAnnotationFromMD (const MDNode *md, key_val_pair_t &retval) |
static void | cacheAnnotationFromMD (const Module *m, const GlobalValue *gv) |
Variables | |
ManagedStatic< per_module_annot_t > | annotationCache |
static sys::Mutex | Lock |
typedef std::map<const GlobalValue *, key_val_pair_t> global_val_annot_t |
Definition at line 32 of file NVPTXUtilities.cpp.
typedef std::map<std::string, std::vector<unsigned> > key_val_pair_t |
Definition at line 31 of file NVPTXUtilities.cpp.
typedef std::map<const Module *, global_val_annot_t> per_module_annot_t |
Definition at line 33 of file NVPTXUtilities.cpp.
static void cacheAnnotationFromMD | ( | const MDNode * | md, |
key_val_pair_t & | retval | ||
) | [static] |
Definition at line 43 of file NVPTXUtilities.cpp.
References llvm::dyn_cast(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::MDString::getString(), llvm::ConstantInt::getZExtValue(), Lock, and llvm::StringRef::str().
Referenced by cacheAnnotationFromMD(), llvm::findAllNVVMAnnotation(), and llvm::findOneNVVMAnnotation().
static void cacheAnnotationFromMD | ( | const Module * | m, |
const GlobalValue * | gv | ||
) | [static] |
Definition at line 69 of file NVPTXUtilities.cpp.
References annotationCache, cacheAnnotationFromMD(), llvm::Module::getNamedMetadata(), llvm::NamedMDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::NamedMDNode::getOperand(), Lock, and llvm::NamedMDForAnnotations.
Definition at line 35 of file NVPTXUtilities.cpp.
Referenced by cacheAnnotationFromMD(), llvm::clearAnnotationCache(), llvm::findAllNVVMAnnotation(), and llvm::findOneNVVMAnnotation().
sys::Mutex Lock [static] |
Definition at line 36 of file NVPTXUtilities.cpp.
Referenced by llvm::PassRegistry::addRegistrationListener(), cacheAnnotationFromMD(), llvm::clearAnnotationCache(), llvm::PassRegistry::enumerateWith(), llvm::findAllNVVMAnnotation(), llvm::findOneNVVMAnnotation(), getDefaultTimerGroup(), llvm::PluginLoader::getNumPlugins(), llvm::PassRegistry::getPassInfo(), llvm::PluginLoader::getPlugin(), llvm::install_fatal_error_handler(), llvm::llvm_shutdown(), llvm::PluginLoader::operator=(), llvm::PassRegistry::registerAnalysisGroup(), llvm::ManagedStaticBase::RegisterManagedStatic(), llvm::PassRegistry::registerPass(), llvm::remove_fatal_error_handler(), llvm::PassRegistry::removeRegistrationListener(), llvm::report_fatal_error(), llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), and llvm::PassRegistry::unregisterPass().