Page MenuHomePhabricator

momo5502 (Maurice Heumann)
User

Projects

User does not belong to any projects.

User Details

User Since
May 19 2020, 6:23 AM (109 w, 5 d)

Recent Activity

Feb 6 2022

momo5502 added a comment to D117500: [clang] Mention MS on-demand TLS initialization in release notes.

Seems like this can be merged, right?

Feb 6 2022, 2:56 AM · Restricted Project

Jan 17 2022

momo5502 added a comment to D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.

Looks great, thanks! Maurice, do you want to add a note about this to docs/ReleaseNotes.rst?

Jan 17 2022, 9:22 AM · Restricted Project
momo5502 requested review of D117500: [clang] Mention MS on-demand TLS initialization in release notes.
Jan 17 2022, 9:21 AM · Restricted Project

Jan 3 2022

momo5502 updated the diff for D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.

This is looking great! Just a few more questions.

What is the behavior with something like:

thread_local int x = 2;
int f() {
  return x;
}

I'm wondering if we need to move this logic into the generic C++ ABI implementation.

The MS compiler only emits the dynamic initializers for variables with constructors/destructors, just like it is currently done here for the Itanium ABI.
I also thought about adopting that behaviour, but I think threre are edge-cases when triggering dynamic TLS initialization even for constant variables is useful.
For example there might be custom TLS callbacks that can affect the value of this variable.

If desired, I can change it to match the behaviour of MS, but I thought it could be beneficial to diverge in this case.

IMO, it is probably best to match behavior here within reason (ignoring bugs latent in MSVC) here. My thinking is that in the face of COMDATs, we cannot ensure which copy of an inline function will make its way to the binary and different link orders would provide different behavior.

Jan 3 2022, 11:04 AM · Restricted Project
momo5502 added a comment to D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.

This is looking great! Just a few more questions.

What is the behavior with something like:

thread_local int x = 2;
int f() {
  return x;
}

I'm wondering if we need to move this logic into the generic C++ ABI implementation.

Jan 3 2022, 8:31 AM · Restricted Project

Dec 31 2021

momo5502 updated the diff for D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.

Comments were addressed

Dec 31 2021, 6:12 AM · Restricted Project

Dec 22 2021

momo5502 updated the diff for D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.

A call to isCompatibleWithMSVC was added with the proper version that introduced the change (1925) and comments describing the intention of the change were added.

Dec 22 2021, 6:11 AM · Restricted Project

Dec 9 2021

momo5502 updated the diff for D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.
Dec 9 2021, 12:00 PM · Restricted Project
momo5502 added a reviewer for D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI: rsmith.
Dec 9 2021, 10:54 AM · Restricted Project
momo5502 updated the summary of D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.
Dec 9 2021, 10:35 AM · Restricted Project
momo5502 requested review of D115456: [MS] Implement on-demand TLS initialization for Microsoft CXX ABI.
Dec 9 2021, 10:29 AM · Restricted Project