[PATCH] D143708: [RISCV] Support emulated TLS

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 11:32:43 PDT 2023


jrtc27 added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/emutls.ll:10
+ at external_x = external thread_local global i32, align 8
+ at external_y = thread_local global i8 7, align 2
+ at internal_y = internal thread_local global i64 9, align 16
----------------
vit9696 wrote:
> jrtc27 wrote:
> > This isn’t external?
> Yes, due to internal_y with the same name.
Huh? You can change y to something else... and you probably should, having two y-based variables is unnecessarily confusing when you could just use z.

I forget if initialised globals without a specified linkage are in fact technically regarded as external, but we don't let you write external there in the IR so it seems a bit confusing to put it in the variable name.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143708/new/

https://reviews.llvm.org/D143708



More information about the llvm-commits mailing list