llvm/llvm/lib/CodeGen/LowerEmuTLS.cpp

//===- LowerEmuTLS.cpp - Add __emutls_[vt].* variables --------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This transformation is required for targets depending on libgcc style
// emulated thread local storage variables. For every defined TLS variable xyz,
// an __emutls_v.xyz is generated. If there is non-zero initialized value
// an __emutls_t.xyz is also generated.
//
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/LowerEmuTLS.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
#include "llvm/Analysis/StackSafetyAnalysis.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Target/TargetMachine.h"

usingnamespacellvm;

#define DEBUG_TYPE

namespace {

class LowerEmuTLS : public ModulePass {};
}

static bool addEmuTlsVar(Module &M, const GlobalVariable *GV);

static void copyLinkageVisibility(Module &M, const GlobalVariable *from,
                                  GlobalVariable *to) {}

PreservedAnalyses LowerEmuTLSPass::run(Module &M, ModuleAnalysisManager &MAM) {}

char LowerEmuTLS::ID =;

INITIALIZE_PASS()

ModulePass *llvm::createLowerEmuTLSPass() {}

bool LowerEmuTLS::runOnModule(Module &M) {}

bool addEmuTlsVar(Module &M, const GlobalVariable *GV) {}