From afced4965bc62fcc0506edb239a6356bf3d2caad Mon Sep 17 00:00:00 2001 From: Pavel Durov Date: Tue, 14 Nov 2023 13:50:07 +0000 Subject: [PATCH] Add emualted tls support. --- llvm/lib/CodeGen/TargetPassConfig.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index bac3dc91045556..8f606b706677a0 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1122,6 +1122,10 @@ bool TargetPassConfig::addISelPasses() { if (YkShadowStack) { addPass(createYkShadowStackPass()); } + + if (TM->useEmulatedTLS()){ + addPass(createLowerEmuTLSPass()); + } // We insert the yk control point pass as late as possible. It has to run // before instruction selection (or the machine IR won't reflect our // patching), but after other passes which mutate the IR (e.g.