LLVM  10.0.0svn
Functions
IRMover.cpp File Reference
#include "llvm/Linker/IRMover.h"
#include "LinkDiagnosticInfo.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Triple.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/GVMaterializer.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/TypeFinder.h"
#include "llvm/Support/Error.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <utility>
Include dependency graph for IRMover.cpp:

Go to the source code of this file.

Functions

static void forceRenaming (GlobalValue *GV, StringRef Name)
 The LLVM SymbolTable class autorenames globals that conflict in the symbol table. More...
 
static StringRef getTypeNamePrefix (StringRef Name)
 
static void getArrayElements (const Constant *C, SmallVectorImpl< Constant *> &Dest)
 
static std::string adjustInlineAsm (const std::string &InlineAsm, const Triple &Triple)
 Return InlineAsm adjusted with target-specific directives if required. More...
 

Function Documentation

◆ adjustInlineAsm()

static std::string adjustInlineAsm ( const std::string &  InlineAsm,
const Triple Triple 
)
static

Return InlineAsm adjusted with target-specific directives if required.

For ARM and Thumb, we have to add directives to select the appropriate ISA to support mixing module-level inline assembly from ARM and Thumb modules.

Definition at line 1349 of file IRMover.cpp.

References llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::getArch(), llvm::Triple::thumb, and llvm::Triple::thumbeb.

◆ forceRenaming()

static void forceRenaming ( GlobalValue GV,
StringRef  Name 
)
static

The LLVM SymbolTable class autorenames globals that conflict in the symbol table.

This is good for all clients except for us. Go through the trouble to force this back.

Definition at line 545 of file IRMover.cpp.

References llvm::AttributeList::addAttribute(), assert(), llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, C, llvm::GlobalAlias::copyAttributesFrom(), llvm::GlobalVariable::copyAttributesFrom(), llvm::GlobalAlias::create(), llvm::Function::Create(), llvm::dyn_cast(), llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, F(), llvm::PointerType::getAddressSpace(), llvm::GlobalObject::getAlignment(), llvm::AttributeList::getAttribute(), llvm::Function::getFunctionType(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::Module::getNamedValue(), llvm::AttributeList::getNumAttrSets(), llvm::GlobalValue::getParent(), llvm::Type::getPointerAddressSpace(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::Attribute::getValueAsType(), llvm::GlobalValue::getValueType(), llvm::Attribute::getWithByValType(), llvm::AttributeList::hasAttribute(), llvm::GlobalValue::hasExternalWeakLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), llvm::Type::isFunctionTy(), llvm::ValueMap< KeyT, ValueT, Config >::lookup(), Name, llvm::AttributeList::removeAttribute(), llvm::GlobalObject::setAlignment(), llvm::GlobalValue::setLinkage(), llvm::Value::setName(), llvm::Expected< T >::takeError(), and llvm::Value::takeName().

Referenced by getArrayElements().

◆ getArrayElements()

static void getArrayElements ( const Constant C,
SmallVectorImpl< Constant *> &  Dest 
)
static

Definition at line 810 of file IRMover.cpp.

References assert(), C, llvm::GlobalVariable::copyAttributesFrom(), DC, llvm::dyn_cast(), E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::SmallVectorImpl< T >::erase(), F(), llvm::ValueMap< KeyT, ValueT, Config >::find(), forceRenaming(), llvm::StructType::get(), llvm::ArrayType::get(), llvm::PointerType::getAddressSpace(), llvm::Constant::getAggregateElement(), llvm::GlobalObject::getAlignment(), llvm::ConstantExpr::getBitCast(), llvm::GlobalValue::getComdat(), llvm::Value::getContext(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::Type::getInt8Ty(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::SequentialType::getNumElements(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::GlobalObject::getSection(), llvm::GlobalValue::getThreadLocalMode(), llvm::Value::getType(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::getVisibility(), llvm::GlobalValue::hasAppendingLinkage(), llvm::GlobalValue::hasGlobalUnnamedAddr(), llvm::GlobalValue::hasLocalLinkage(), I, llvm::GlobalValue::InternalLinkage, llvm::GlobalVariable::isConstant(), llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isDeclarationForLinker(), Name, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Intrinsic::remangleIntrinsicFunction(), llvm::remove_if(), llvm::MipsISD::Ret, llvm::PPCISD::SC, llvm::GlobalValue::setLinkage(), llvm::Comdat::setSelectionKind(), llvm::SmallVectorBase::size(), llvm::ARM_MB::ST, and llvm::Constant::stripPointerCasts().

◆ getTypeNamePrefix()

static StringRef getTypeNamePrefix ( StringRef  Name)
static