[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-10 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. In D92662#2446777 , @jyknight wrote: > I don't think we should change the meaning of `__attribute__((const))` to > exclude depending on thread-id. > > However, if we do want to do so, and call the existing uses of > `__attribute__

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-10 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I don't think we should change the meaning of `__attribute__((const))` to exclude depending on thread-id. However, if we do want to do so, and call the existing uses of `__attribute__((const))` in glibc invalid, we need to special case many more functions. Looking thr

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D92662#2444196 , @lxfind wrote: > In D92662#2443970 , @MaskRay wrote: > >> If the attribute is not suitable, glibc should drop it. The compiler can add >> `readnone`/`readonly` if approp

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-09 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. In D92662#2443970 , @MaskRay wrote: > If the attribute is not suitable, glibc should drop it. The compiler can add > `readnone`/`readonly` if appropriate. It's a C library interface though, and Coroutine is likely too new for this

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. It is worth requesting clarification on GCC `__attribute__((const))`: (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66512) If the attribute is not suitable, glibc should drop it. The compiler can add `readnone`/`readonly` if appropriate. Repository: rG LLVM Github M

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-09 Thread Xun Li via Phabricator via cfe-commits
lxfind updated this revision to Diff 310599. lxfind added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92662/new/ https://reviews.llvm.org/D92662 Files: clang/lib/Sema/SemaDecl.cpp clang/test/CodeGenCoroutines/coro-pthread

[PATCH] D92662: [Clang][Coroutine] Drop const attribute on pthread_self when coroutine is enabled

2020-12-04 Thread Xun Li via Phabricator via cfe-commits
lxfind created this revision. Herald added subscribers: hoy, modimo, wenlei, modocache. lxfind requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch is to address https://bugs.llvm.org/show_bug.cgi?id=47833 A relevant discussion can al