From 8d5278769e152c549ac1e546c2a071f783f14fda Mon Sep 17 00:00:00 2001 From: Pavel Durov Date: Tue, 14 Nov 2023 14:40:26 +0000 Subject: [PATCH] Add YKFIXME comment. --- llvm/lib/CodeGen/TargetPassConfig.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 8f606b706677a0..e813761931f2eb 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1122,7 +1122,9 @@ bool TargetPassConfig::addISelPasses() { if (YkShadowStack) { addPass(createYkShadowStackPass()); } - + // YKFIXME: This is a hack. The `createLowerEmuTLSPass` pass is already added above. + // We need to add it again since we want to run it on the new thread-local ShadowStack instance + // which is inserted after the original TLS pass has run. if (TM->useEmulatedTLS()){ addPass(createLowerEmuTLSPass()); }