LLVM: lib/Target/XCore/XCoreLowerThreadLocal.cpp File Reference (original) (raw)

This file contains a pass that lowers thread local variables on the XCore. More...

Go to the source code of this file.

Macros
#define DEBUG_TYPE "xcore-lower-thread-local"
Functions
INITIALIZE_PASS (XCoreLowerThreadLocal, "xcore-lower-thread-local", "Lower thread local variables", false, false) ModulePass *llvm
static ArrayType * createLoweredType (Type *OriginalType)
static Constant * createLoweredInitializer (ArrayType *NewType, Constant *OriginalInitializer)
static bool replaceConstantExprOp (ConstantExpr *CE, Pass *P)
static bool rewriteNonInstructionUses (GlobalVariable *GV, Pass *P)
static bool isZeroLengthArray (Type *Ty)

This file contains a pass that lowers thread local variables on the XCore.

Definition in file XCoreLowerThreadLocal.cpp.

DEBUG_TYPE

#define DEBUG_TYPE "xcore-lower-thread-local"

createLoweredInitializer()

createLoweredType()

INITIALIZE_PASS()

INITIALIZE_PASS ( XCoreLowerThreadLocal ,
"xcore-lower-thread-local" ,
"Lower thread local variables" ,
false ,
false )

isZeroLengthArray()

bool isZeroLengthArray ( Type * Ty) static

replaceConstantExprOp()

Definition at line 75 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(), P, llvm::SmallVectorImpl< T >::pop_back_val(), replaceConstantExprOp(), llvm::sort(), llvm::SplitEdge(), and llvm::unique().

Referenced by replaceConstantExprOp(), and rewriteNonInstructionUses().

rewriteNonInstructionUses()

MaxThreads

cl::opt< unsigned > MaxThreads("xcore-max-threads", cl::Optional, cl::desc("Maximum number of threads (for emulation thread-local storage)"), cl::Hidden, cl::value_desc("number"), cl::init(8)) ( "xcore-max-threads" , cl::Optional , cl::desc("Maximum number of threads (for emulation thread-local storage)") , cl::Hidden , cl::value_desc("number") , cl::init(8) ) static