|
LLVM 24.0.0git
|
This file contains a pass that lowers thread local variables on the XCore. More...
#include "XCore.h"#include "XCoreSubtarget.h"#include "llvm/IR/Analysis.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/IntrinsicsXCore.h"#include "llvm/IR/Module.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/ValueHandle.h"#include "llvm/Pass.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "xcore-lower-thread-local" |
Functions | |
| INITIALIZE_PASS (XCoreLowerThreadLocalLegacy, "xcore-lower-thread-local", "Lower thread local variables", false, false) ModulePass *llvm | |
| static ArrayType * | createLoweredType (Type *OriginalType, unsigned MaxThreads) |
| static Constant * | createLoweredInitializer (ArrayType *NewType, Constant *OriginalInitializer) |
| static bool | replaceConstantExprOp (ConstantExpr *CE) |
| static bool | rewriteNonInstructionUses (GlobalVariable *GV) |
| static bool | lowerGlobal (GlobalVariable *GV, unsigned MaxThreads) |
| static bool | lowerGlobalsInModule (Module &M) |
This file contains a pass that lowers thread local variables on the XCore.
Definition in file XCoreLowerThreadLocal.cpp.
| #define DEBUG_TYPE "xcore-lower-thread-local" |
Definition at line 31 of file XCoreLowerThreadLocal.cpp.
Definition at line 62 of file XCoreLowerThreadLocal.cpp.
References llvm::ConstantArray::get().
Referenced by lowerGlobal().
Definition at line 57 of file XCoreLowerThreadLocal.cpp.
References llvm::ArrayType::get().
Referenced by lowerGlobal().
| INITIALIZE_PASS | ( | XCoreLowerThreadLocalLegacy | , |
| "xcore-lower-thread-local" | , | ||
| "Lower thread local variables" | , | ||
| false | , | ||
| false | ) |
Definition at line 50 of file XCoreLowerThreadLocal.cpp.
References llvm::createXCoreLowerThreadLocalLegacyPass().
|
static |
Definition at line 119 of file XCoreLowerThreadLocal.cpp.
References llvm::cast(), createLoweredInitializer(), createLoweredType(), llvm::GlobalVariable::eraseFromParent(), llvm::PointerType::getAddressSpace(), llvm::GlobalVariable::getGlobalSize(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalVariable::isConstant(), llvm::GlobalVariable::isExternallyInitialized(), llvm::Type::isSized(), llvm::GlobalValue::isThreadLocal(), llvm::GlobalValue::NotThreadLocal, llvm::reportFatalUsageError(), rewriteNonInstructionUses(), llvm::Value::takeName(), Users, and llvm::Value::users().
Referenced by lowerGlobalsInModule().
Definition at line 167 of file XCoreLowerThreadLocal.cpp.
References lowerGlobal(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::XCoreLowerThreadLocalPass::run().
|
static |
Definition at line 70 of file XCoreLowerThreadLocal.cpp.
References llvm::dyn_cast(), E(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::Instruction::getNumSuccessors(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getTerminator(), I, llvm::Instruction::insertBefore(), llvm::SmallVectorImpl< T >::pop_back_val(), replaceConstantExprOp(), llvm::sort(), llvm::SplitEdge(), and llvm::unique().
Referenced by replaceConstantExprOp(), and rewriteNonInstructionUses().
|
static |
Definition at line 105 of file XCoreLowerThreadLocal.cpp.
References llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::isa(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), replaceConstantExprOp(), and llvm::Value::users().
Referenced by lowerGlobal().