r244063 - Add missing atomic libcall support.

2015-08-05 Thread James Y Knight
Author: jyknight Date: Wed Aug 5 11:57:36 2015 New Revision: 244063 URL: http://llvm.org/viewvc/llvm-project?rev=244063&view=rev Log: Add missing atomic libcall support. Support for emitting libcalls for __atomic_fetch_nand and __atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and so

Re: [PATCH] D11298: Convert a few classes over to use the new TrailingObjects helper.

2015-08-05 Thread James Y Knight
jyknight marked an inline comment as done. Comment at: include/clang/AST/Decl.h:3620 @@ +3619,3 @@ + public DeclContext, + llvm::TrailingObjects { +protected: rsmith wrote: > I would prefer to see an explicit `private` access specifier here. Done here an

Re: r314373 - [NFC] Don't use C++17 standard lib variable template helper traits, instead use ::value.

2017-09-27 Thread James Y Knight via cfe-commits
This still doesn't work on some compilers, because std::is_trivially_copyable isn't available: http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable/builds/265/steps/build/logs/stdio On Wed, Sep 27, 2017 at 10:00 PM, Faisal Vali via cfe-commits < cfe-commits@lists.llvm.org

Re: r314373 - [NFC] Don't use C++17 standard lib variable template helper traits, instead use ::value.

2017-09-28 Thread James Y Knight via cfe-commits
bots in over 12 hrs i think? > > Should I just turn it into a comment? > > Thanks! > > Faisal Vali > > > > On Wed, Sep 27, 2017 at 9:54 PM, James Y Knight > wrote: > > This still doesn't work on some compilers, because > > std::is_trivially_copyabl

Re: [libcxx] r337960 - [libc++] Use __int128_t to represent file_time_type.

2018-07-25 Thread James Y Knight via cfe-commits
As is the case on most modern platforms, the ability to store a high-res file timestamp is dependent on the filesystem the file is stored on. The HFS+ filesystem (used by default before macOS 10.13) stores timestamps at a 1-second granularity, and APFS (now the default) at a 1 nanosecond granulari

[libcxx] r305394 - PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 11:40:03 2017 New Revision: 305394 URL: http://llvm.org/viewvc/llvm-project?rev=305394&view=rev Log: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This chang

r305399 - Define _GNU_SOURCE for rtems c++

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 12:01:18 2017 New Revision: 305399 URL: http://llvm.org/viewvc/llvm-project?rev=305399&view=rev Log: Define _GNU_SOURCE for rtems c++ This is required by the libc++ locale support. Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D34105 Mod

Re: r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-21 Thread James Y Knight via cfe-commits
I think if a version number isn't explicitly specified in the -target value, the value from -m-version-min ought to still be used, as it was before. Currently, clang will ignore the -m-version-min version number if the target has a particular OS specified, even if it has no version number as part

Re: r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-21 Thread James Y Knight via cfe-commits
he same time I believe that we would rather not use this patch, but if it's urgent for your projects then maybe I can land it now and then we can establish some sort of timeline for when it can be reverted? Thanks, Alex On 21 December 2017 at 08:00, James Y Knight wrote: > I think if a

r344110 - ExprConstant: Make __builtin_object_size use EM_IgnoreSideEffects.

2018-10-09 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Oct 9 19:53:43 2018 New Revision: 344110 URL: http://llvm.org/viewvc/llvm-project?rev=344110&view=rev Log: ExprConstant: Make __builtin_object_size use EM_IgnoreSideEffects. And, since EM_OffsetFold is now unused, remove it. While builtin_object_size intends to ignore

r351200 - Remove irrelevant references to legacy git repositories from

2019-01-15 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 15 08:18:52 2019 New Revision: 351200 URL: http://llvm.org/viewvc/llvm-project?rev=351200&view=rev Log: Remove irrelevant references to legacy git repositories from compiler identification lines in test-cases. (Doing so only because it's then easier to search for re

[clang-tools-extra] r352514 - Adjust documentation for git migration.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 08:37:27 2019 New Revision: 352514 URL: http://llvm.org/viewvc/llvm-project?rev=352514&view=rev Log: Adjust documentation for git migration. This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.

r352514 - Adjust documentation for git migration.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 08:37:27 2019 New Revision: 352514 URL: http://llvm.org/viewvc/llvm-project?rev=352514&view=rev Log: Adjust documentation for git migration. This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.

[libclc] r352514 - Adjust documentation for git migration.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 08:37:27 2019 New Revision: 352514 URL: http://llvm.org/viewvc/llvm-project?rev=352514&view=rev Log: Adjust documentation for git migration. This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.

[libunwind] r352514 - Adjust documentation for git migration.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 08:37:27 2019 New Revision: 352514 URL: http://llvm.org/viewvc/llvm-project?rev=352514&view=rev Log: Adjust documentation for git migration. This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.

r352535 - Fix the behavior of clang's -w flag.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 11:33:48 2019 New Revision: 352535 URL: http://llvm.org/viewvc/llvm-project?rev=352535&view=rev Log: Fix the behavior of clang's -w flag. It is intended to disable _all_ warnings, even those upgraded to errors via `-Werror=warningname` or `#pragma clang diagnosti

r352595 - Cleanup: replace uses of CallSite with CallBase.

2019-01-29 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Jan 29 18:54:28 2019 New Revision: 352595 URL: http://llvm.org/viewvc/llvm-project?rev=352595&view=rev Log: Cleanup: replace uses of CallSite with CallBase. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp cfe/trunk/lib/CodeGen/CGBuiltin.cpp cfe/trunk/lib/CodeGe

r352791 - [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

2019-01-31 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Jan 31 12:35:56 2019 New Revision: 352791 URL: http://llvm.org/viewvc/llvm-project?rev=352791&view=rev Log: [opaque pointer types] Add a FunctionCallee wrapper type, and use it. The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful conven

Re: [cfe-dev] r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-05 Thread James Y Knight via cfe-commits
Nobody should be using "-Weverything" in their default build flags! It should only be used as a way to find the names of interesting warning flags. I'd note that "-Weverything" even has warnings that _conflict_ with each-other... It's unworkable for clang to have a policy which prevents the additi

r355278 - Make the new SanitizerMask code added in r355190 constexpr.

2019-03-02 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sat Mar 2 12:22:48 2019 New Revision: 355278 URL: http://llvm.org/viewvc/llvm-project?rev=355278&view=rev Log: Make the new SanitizerMask code added in r355190 constexpr. Then, as a consequence, remove the complex set of workarounds for initialization order -- which are ap

r355279 - Tweak r355278 for compatibility with gcc 6 and earlier.

2019-03-02 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sat Mar 2 13:20:30 2019 New Revision: 355279 URL: http://llvm.org/viewvc/llvm-project?rev=355279&view=rev Log: Tweak r355278 for compatibility with gcc 6 and earlier. Modified: cfe/trunk/lib/Basic/Sanitizers.cpp Modified: cfe/trunk/lib/Basic/Sanitizers.cpp URL: http:

r355280 - Tweak r355278 for compatibility with gcc 6 and earlier.

2019-03-02 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sat Mar 2 13:55:36 2019 New Revision: 355280 URL: http://llvm.org/viewvc/llvm-project?rev=355280&view=rev Log: Tweak r355278 for compatibility with gcc 6 and earlier. Modified: cfe/trunk/lib/Basic/Sanitizers.cpp Modified: cfe/trunk/lib/Basic/Sanitizers.cpp URL: http:

Re: r355322 - Enable _rotl, _lrotl, _rotr, _lrotr on all platforms.

2019-03-07 Thread James Y Knight via cfe-commits
This patch breaks some code which is (conditionally) defining functions of these names on certain platforms. Now, it's true that it shouldn't be doing that, and if the claim in the commit message about GCC was true, I'd just say "don't do that". But, the commit message is wrong. GCC does _not_ def

r356789 - IR: Support parsing numeric block ids, and emit them in textual output.

2019-03-22 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Mar 22 11:27:13 2019 New Revision: 356789 URL: http://llvm.org/viewvc/llvm-project?rev=356789&view=rev Log: IR: Support parsing numeric block ids, and emit them in textual output. Just as as llvm IR supports explicitly specifying numeric value ids for instructions, and

r360084 - PR41183: Don't emit strict-prototypes warning for an implicit function

2019-05-06 Thread James Y Knight via cfe-commits
Author: jyknight Date: Mon May 6 14:37:59 2019 New Revision: 360084 URL: http://llvm.org/viewvc/llvm-project?rev=360084&view=rev Log: PR41183: Don't emit strict-prototypes warning for an implicit function declaration. It should emit _only_ an implicit-function-declaration warning, not both of th

r343867 - Emit diagnostic note when calling an invalid function declaration.

2018-10-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Oct 5 10:49:48 2018 New Revision: 343867 URL: http://llvm.org/viewvc/llvm-project?rev=343867&view=rev Log: Emit diagnostic note when calling an invalid function declaration. The comment said it was intentionally not emitting any diagnostic because the declaration itsel

r343892 - Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Oct 5 14:53:51 2018 New Revision: 343892 URL: http://llvm.org/viewvc/llvm-project?rev=343892&view=rev Log: Emit CK_NoOp casts in C mode, not just C++. Previously, it had been using CK_BitCast even for casts that only change const/restrict/volatile. Now it will use CK_N

r352800 - Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."

2019-01-31 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Jan 31 13:51:58 2019 New Revision: 352800 URL: http://llvm.org/viewvc/llvm-project?rev=352800&view=rev Log: Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it." This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791). Seems to r

r352827 - [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

2019-01-31 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Jan 31 18:28:03 2019 New Revision: 352827 URL: http://llvm.org/viewvc/llvm-project?rev=352827&view=rev Log: [opaque pointer types] Add a FunctionCallee wrapper type, and use it. Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, ho

r352887 - Fix some sphinx doc errors.

2019-02-01 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Feb 1 09:06:41 2019 New Revision: 352887 URL: http://llvm.org/viewvc/llvm-project?rev=352887&view=rev Log: Fix some sphinx doc errors. Modified: cfe/trunk/docs/ClangTools.rst Modified: cfe/trunk/docs/ClangTools.rst URL: http://llvm.org/viewvc/llvm-project/cfe/tru

r352946 - Remove redundant FunctionDecl argument from a couple functions.

2019-02-01 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Feb 1 17:48:23 2019 New Revision: 352946 URL: http://llvm.org/viewvc/llvm-project?rev=352946&view=rev Log: Remove redundant FunctionDecl argument from a couple functions. This argument was added in r254554 in order to support the pass_object_size attribute. However, in

r353009 - [opaque pointer types] Trivial changes towards CallInst requiring

2019-02-03 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sun Feb 3 13:53:49 2019 New Revision: 353009 URL: http://llvm.org/viewvc/llvm-project?rev=353009&view=rev Log: [opaque pointer types] Trivial changes towards CallInst requiring explicit function types. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp cfe/trunk/lib/Cod

r353181 - [opaque pointer types] Fix the CallInfo passed to EmitCall in some

2019-02-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Feb 5 08:05:50 2019 New Revision: 353181 URL: http://llvm.org/viewvc/llvm-project?rev=353181&view=rev Log: [opaque pointer types] Fix the CallInfo passed to EmitCall in some edge cases. Currently, EmitCall emits a call instruction with a function type derived from the

r353197 - Minor cleanup: remove CGBuild::CreateConst*ByteGEP overloads taking a Value*.

2019-02-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Feb 5 11:01:33 2019 New Revision: 353197 URL: http://llvm.org/viewvc/llvm-project?rev=353197&view=rev Log: Minor cleanup: remove CGBuild::CreateConst*ByteGEP overloads taking a Value*. Modified: cfe/trunk/lib/CodeGen/CGBuilder.h cfe/trunk/lib/CodeGen/TargetInfo

r353199 - [opaque pointer types] More trivial changes to pass FunctionType to CallInst.

2019-02-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Feb 5 11:17:50 2019 New Revision: 353199 URL: http://llvm.org/viewvc/llvm-project?rev=353199&view=rev Log: [opaque pointer types] More trivial changes to pass FunctionType to CallInst. Change various functions to use FunctionCallee or Function*. Pass function type thr

r353246 - Fix MSVC constructor call extension after b92d290e48e9 (r353181).

2019-02-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Tue Feb 5 16:06:03 2019 New Revision: 353246 URL: http://llvm.org/viewvc/llvm-project?rev=353246&view=rev Log: Fix MSVC constructor call extension after b92d290e48e9 (r353181). The assert added to EmitCall there was triggering in Windows Chromium builds, due to a mismatch

r353355 - [opaque pointer types] Pass through function types for TLS

2019-02-06 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Feb 6 17:14:17 2019 New Revision: 353355 URL: http://llvm.org/viewvc/llvm-project?rev=353355&view=rev Log: [opaque pointer types] Pass through function types for TLS initialization and global destructor calls. Differential Revision: https://reviews.llvm.org/D57801 Mod

r353356 - [opaque pointer types] Make EmitCall pass Function Types to

2019-02-06 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Feb 6 17:15:41 2019 New Revision: 353356 URL: http://llvm.org/viewvc/llvm-project?rev=353356&view=rev Log: [opaque pointer types] Make EmitCall pass Function Types to CreateCall/Invoke. Also, remove the getFunctionType() function from CGCallee, since it accesses the po

r353629 - [opaque pointer types] Cleanup CGBuilder's Create*GEP.

2019-02-09 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sat Feb 9 14:22:28 2019 New Revision: 353629 URL: http://llvm.org/viewvc/llvm-project?rev=353629&view=rev Log: [opaque pointer types] Cleanup CGBuilder's Create*GEP. The various EltSize, Offset, DataLayout, and StructLayout arguments are all computable from the Address's e

r361429 - Add back --sysroot support for darwin header search.

2019-05-22 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed May 22 13:39:51 2019 New Revision: 361429 URL: http://llvm.org/viewvc/llvm-project?rev=361429&view=rev Log: Add back --sysroot support for darwin header search. Before e97b5f5cf37e ([clang][Darwin] Refactor header search path logic into the driver), both --sysroot and -

r372492 - NFC: Change ObjCQualified*TypesAreCompatible to take

2019-09-21 Thread James Y Knight via cfe-commits
Author: jyknight Date: Sat Sep 21 15:31:28 2019 New Revision: 372492 URL: http://llvm.org/viewvc/llvm-project?rev=372492&view=rev Log: NFC: Change ObjCQualified*TypesAreCompatible to take ObjCObjectPointerType arguments. All callers already had one, just creating a QualType to pass, after which t

r375124 - [ObjC] Add some additional test cases around pointer conversions.

2019-10-17 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Oct 17 08:18:59 2019 New Revision: 375124 URL: http://llvm.org/viewvc/llvm-project?rev=375124&view=rev Log: [ObjC] Add some additional test cases around pointer conversions. This is especially important for Objective-C++, which is entirely missing this testing at the mo

r375125 - [ObjC] Diagnose implicit type coercion from ObjC 'Class' to object

2019-10-17 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Oct 17 08:27:04 2019 New Revision: 375125 URL: http://llvm.org/viewvc/llvm-project?rev=375125&view=rev Log: [ObjC] Diagnose implicit type coercion from ObjC 'Class' to object pointer types. For example, in Objective-C mode, the initialization of 'x' in: ``` @implement

[clang] aca3d06 - Fix Darwin 'constinit thread_local' variables.

2020-05-27 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2020-05-27T11:59:30-04:00 New Revision: aca3d067efe194539efd1e0fcf03820a2c377753 URL: https://github.com/llvm/llvm-project/commit/aca3d067efe194539efd1e0fcf03820a2c377753 DIFF: https://github.com/llvm/llvm-project/commit/aca3d067efe194539efd1e0fcf03820a2c377753

Re: [clang-tools-extra] 7e2d27b - Fix two -Wrange-loop-analysis warnings that Xcode 12 beta incorrectly complains about

2020-07-04 Thread James Y Knight via cfe-commits
Seems like we should disable the warning for this compiler instead of making the code worse for the benefit of a temporarily broken warning? On Sat, Jul 4, 2020, 8:42 PM Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Nico Weber > Date: 2020-07-04T20:41:33-04:00 > New

[clang] 381df16 - Clang Driver: Use Apple ld64's new @response-file support.

2020-06-29 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2020-06-29T18:26:53-04:00 New Revision: 381df1653c927efa9dac86c24a9db2b98f270de0 URL: https://github.com/llvm/llvm-project/commit/381df1653c927efa9dac86c24a9db2b98f270de0 DIFF: https://github.com/llvm/llvm-project/commit/381df1653c927efa9dac86c24a9db2b98f270de0

[clang] 4772b99 - Clang Driver: refactor support for writing response files to be

2020-06-29 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2020-06-29T18:27:02-04:00 New Revision: 4772b99dffec4f87bb7bc9273495066058ac0186 URL: https://github.com/llvm/llvm-project/commit/4772b99dffec4f87bb7bc9273495066058ac0186 DIFF: https://github.com/llvm/llvm-project/commit/4772b99dffec4f87bb7bc9273495066058ac0186

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-12-04 Thread James Y Knight via cfe-commits
jyknight wrote: I don't think this is a good idea. Not only is that weird to magically switch to an apple build from a non-apple platform, this is also not even a particularly useful behavior for an Apple platform, where "darwin" is basically deprecated, and you're supposed to use a target of

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight created https://github.com/llvm/llvm-project/pull/74469 This causes current mainline to now report "18.0.0git" instead of "18.0.0". Fixes #53825 >From 00f710804e77ccc001025a4524ab6882377d1089 Mon Sep 17 00:00:00 2001 From: James Y Knight D

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/74469 >From 00f710804e77ccc001025a4524ab6882377d1089 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Tue, 5 Dec 2023 08:41:08 -0500 Subject: [PATCH 1/2] Include LLVM_VERSION_SUFFIX in the Clang version str

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
@@ -650,6 +652,7 @@ if (CLANG_ENABLE_BOOTSTRAP) CLANG_VERSION_MAJOR CLANG_VERSION_MINOR CLANG_VERSION_PATCHLEVEL +CLANG_VERSION_SUFFIX jyknight wrote: This list is of CMake variables which automatically get passed through between stages in a m

[llvm] [clang] Include LLVM_VERSION_SUFFIX in the Clang version string. (PR #74469)

2023-12-05 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/74469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
https://github.com/jyknight requested changes to this pull request. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
@@ -8728,7 +8728,13 @@ def err_atomic_op_needs_atomic_int : Error< "%select{|atomic }0integer (%1 invalid)">; def warn_atomic_op_has_invalid_memory_order : Warning< "memory order argument to atomic operation is invalid">, - InGroup>; + InGroup; +def warn_atomic_op_has_inv

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
@@ -8728,7 +8728,13 @@ def err_atomic_op_needs_atomic_int : Error< "%select{|atomic }0integer (%1 invalid)">; def warn_atomic_op_has_invalid_memory_order : Warning< "memory order argument to atomic operation is invalid">, - InGroup>; + InGroup; +def warn_atomic_op_has_inv

[llvm] [clang] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-11 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/74275 >From 7baffd6d1f4254b1bd725ddc883a360d79267435 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Sat, 2 Dec 2023 23:05:26 -0500 Subject: [PATCH 1/2] [X86] Use plain load/store instead of cmpxchg16b

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-11 Thread James Y Knight via cfe-commits
jyknight wrote: PR description needs to be updated after changes. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Reorder Atomic builtins to be consistent. (PR #72718)

2023-11-21 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/72718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Reorder Atomic builtins to be consistent. (PR #72718)

2023-11-21 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/72718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] make sure arguments of __atomic_exchange complete type (PR #75135)

2023-12-12 Thread James Y Knight via cfe-commits
jyknight wrote: Why only `__atomic_exchange`? Presumably we need to be doing the same with every other of the atomic builtins as well (unless they already have this check and we only missed it on exchange?) https://github.com/llvm/llvm-project/pull/75135 ___

[clang-tools-extra] [llvm] [clang] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-14 Thread James Y Knight via cfe-commits
jyknight wrote: Ping! https://github.com/llvm/llvm-project/pull/74275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-14 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/74959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

2023-12-14 Thread James Y Knight via cfe-commits
jyknight wrote: > > Did this change anything for the `scoped_atomic_compare_exchange_n` variant > > I added recently? The scoped variant(s) use the same codepath here, so they'll also verify that the failure order is valid. https://github.com/llvm/llvm-project/pull/74959 _

[clang] [libclang/python] Fix some minor typos (PR #74292)

2023-12-14 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/74292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
@@ -30095,12 +30102,16 @@ TargetLoweringBase::AtomicExpansionKind X86TargetLowering::shouldExpandAtomicStoreInIR(StoreInst *SI) const { Type *MemType = SI->getValueOperand()->getType(); - bool NoImplicitFloatOps = - SI->getFunction()->hasFnAttribute(Attribute::NoImplic

[llvm] [clang-tools-extra] [clang] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/74275 >From 7baffd6d1f4254b1bd725ddc883a360d79267435 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Sat, 2 Dec 2023 23:05:26 -0500 Subject: [PATCH 1/3] [X86] Use plain load/store instead of cmpxchg16b

[clang-tools-extra] [clang] [llvm] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
@@ -228,87 +228,86 @@ define void @widen_broadcast_unaligned(ptr %p0, i32 %v) { } define i128 @load_i128(ptr %ptr) { -; CHECK-O0-LABEL: load_i128: -; CHECK-O0: # %bb.0: -; CHECK-O0-NEXT:pushq %rbx -; CHECK-O0-NEXT:.cfi_def_cfa_offset 16 -; CHECK-O0-NEXT:.cfi_

[clang-tools-extra] [llvm] [clang] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
@@ -31259,14 +31274,23 @@ static SDValue LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG, if (!IsSeqCst && IsTypeLegal) return Op; - if (VT == MVT::i64 && !IsTypeLegal) { + if (!IsTypeLegal && !Subtarget.useSoftFloat() && + !DAG.getMachineFunction().getFunction()

[llvm] [clang] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
@@ -30115,12 +30126,16 @@ X86TargetLowering::shouldExpandAtomicLoadInIR(LoadInst *LI) const { // If this a 64 bit atomic load on a 32-bit target and SSE2 is enabled, we // can use movq to do the load. If we have X87 we can load into an 80-bit // X87 register and store it

[clang] [llvm] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2023-12-16 Thread James Y Knight via cfe-commits
@@ -31259,14 +31274,23 @@ static SDValue LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG, if (!IsSeqCst && IsTypeLegal) return Op; - if (VT == MVT::i64 && !IsTypeLegal) { + if (!IsTypeLegal && !Subtarget.useSoftFloat() && + !DAG.getMachineFunction().getFunction()

[clang-tools-extra] [clang] [llvm] Add out-of-line-atomics support to GlobalISel (PR #74588)

2023-12-18 Thread James Y Knight via cfe-commits
jyknight wrote: > This sounds extremely unsound It is completely unsound. The constraints that approximately every architecture has on LL/SC loops make it unsound to ever generate isolated LL and SC instructions at the IR level, as we are currently doing on AArch64, ARM, and Hexagon. We alre

[clang] [compiler-rt] [libc] [clang-tools-extra] [libcxx] [llvm] [lldb] [flang] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread James Y Knight via cfe-commits
jyknight wrote: I'm somewhat concerned about the default for `-E` being to explode `#embed` into the comma-separated raw integers. Even with moderately-sized embeds, I think it'll generate unusably-bloated output. The human-readability of a big list of integers is not better than embedded base

[llvm] [libcxx] [clang] [clang-tools-extra] Mark some std::string functions noinline. (PR #72869)

2023-11-27 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/72869 >From 7c51f0cb27079c79f924ff746dccb14637641fe4 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Mon, 20 Nov 2023 13:43:32 + Subject: [PATCH] Mark some std::string functions noinline. The intent of th

[libc] [clang] [libcxx] [flang] [compiler-rt] [lldb] [llvm] [clang-tools-extra] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread James Y Knight via cfe-commits
jyknight wrote: I guess I'd consider the "mental model" here to be that (notionally) `#embed` is preprocessed by expanding to `#embed_base64`, which is handled by the compiler proper, not the preprocessor. Yes, that's not entirely true in the implementation, but it seems like a reasonable way

[llvm] [libcxx] [clang-tools-extra] [clang] Mark some std::string functions noinline. (PR #72869)

2023-11-28 Thread James Y Knight via cfe-commits
jyknight wrote: Seeing no further feedback, going ahead and submitting. https://github.com/llvm/llvm-project/pull/72869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [llvm] [clang-tools-extra] [clang] Mark some std::string functions noinline. (PR #72869)

2023-11-28 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/72869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [clang-tools-extra] [libcxx] [lldb] [llvm] [compiler-rt] [lld] [flang] Fix clang to recognize new C23 modifiers %w and %wf when printing (PR #71771)

2023-11-30 Thread James Y Knight via cfe-commits
@@ -286,7 +286,33 @@ clang::analyze_format_string::ParseLengthModifier(FormatSpecifier &FS, lmKind = LengthModifier::AsInt3264; break; case 'w': - lmKind = LengthModifier::AsWide; ++I; break; + ++I; + if (I == E) return false; + if (*I == 'f

[compiler-rt] [lldb] [llvm] [clang-tools-extra] [libc] [libcxx] [clang] [lld] [flang] Fix clang to recognize new C23 modifiers %w and %wf when printing (PR #71771)

2023-11-30 Thread James Y Knight via cfe-commits
@@ -484,6 +484,26 @@ bool clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers( return false; } +ArgType clang::analyze_format_string::wToArgType( +int size, bool fast, ASTContext &C) { + ArgType fastType = C.getTargetInfo().getTriple().isArch64Bit()

[clang] Use Address for CGBuilder's CreateAtomicRMW and CreateAtomicCmpXchg. (PR #74349)

2023-12-04 Thread James Y Knight via cfe-commits
will pass through greater-than-required alignments, however. >From 7fd7ebbf60beacb63ddfff16a7c4405e80cb62b4 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Mon, 4 Dec 2023 12:11:58 -0500 Subject: [PATCH] Use Address for CGBuilder's CreateAtomicRMW and CreateAtomicCmpXchg. Update all

[clang] Use Address for CGBuilder's CreateAtomicRMW and CreateAtomicCmpXchg. (PR #74349)

2023-12-04 Thread James Y Knight via cfe-commits
https://github.com/jyknight updated https://github.com/llvm/llvm-project/pull/74349 >From 7fd7ebbf60beacb63ddfff16a7c4405e80cb62b4 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Mon, 4 Dec 2023 12:11:58 -0500 Subject: [PATCH 1/2] Use Address for CGBuilder's CreateAtomi

[clang] Use Address for CGBuilder's CreateAtomicRMW and CreateAtomicCmpXchg. (PR #74349)

2023-12-04 Thread James Y Knight via cfe-commits
https://github.com/jyknight closed https://github.com/llvm/llvm-project/pull/74349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2024-01-02 Thread James Y Knight via cfe-commits
jyknight wrote: Ping! https://github.com/llvm/llvm-project/pull/74275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b3d2642 - NFC: Reflow comment for readability.

2024-01-03 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2024-01-03T09:34:07-05:00 New Revision: b3d26426b06ee74bf79f766375a37c384aa0132b URL: https://github.com/llvm/llvm-project/commit/b3d26426b06ee74bf79f766375a37c384aa0132b DIFF: https://github.com/llvm/llvm-project/commit

[clang] [llvm] [clang-tools-extra] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2024-01-08 Thread James Y Knight via cfe-commits
@@ -30113,32 +30120,40 @@ TargetLoweringBase::AtomicExpansionKind X86TargetLowering::shouldExpandAtomicStoreInIR(StoreInst *SI) const { Type *MemType = SI->getValueOperand()->getType(); - bool NoImplicitFloatOps = - SI->getFunction()->hasFnAttribute(Attribute::NoImplic

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -1047,122 +1019,19 @@ RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E) { Dest = Atomics.castToAtomicIntPointer(Dest); } - // Use a library call. See: http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary . - if (UseLibcall) { -bool UseOptimizedLibcall = false; -

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -1047,122 +1019,19 @@ RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E) { Dest = Atomics.castToAtomicIntPointer(Dest); } - // Use a library call. See: http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary . - if (UseLibcall) { -bool UseOptimizedLibcall = false; -

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -1,120 +1,147 @@ -// RUN: %clang_cc1 < %s -triple armv5e-none-linux-gnueabi -emit-llvm -O1 | FileCheck %s - -// FIXME: This file should not be checking -O1 output. -// Ie, it is testing many IR optimizer passes as part of front-end verification. +// RUN: %clang_cc1 < %s -trip

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -7,22 +7,19 @@ // RUN: %clang_cc1 -triple riscv64 -target-feature +a -O1 -emit-llvm %s -o - \ // RUN: | FileCheck %s -check-prefix=RV64IA -// This test demonstrates that MaxAtomicInlineWidth is set appropriately when jyknight wrote: I think this test nee

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
https://github.com/jyknight commented: Overall, I think this is a great improvement. And I believe it should be correct to do now, after fixing the backends' MaxAtomicSizeInBitsSupported in #75703 #75185 #75112 #74385 #74389, and fixing Clang's propagation of alignment to atomicrmw/cmpxchg in

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -23,7 +23,7 @@ typedef __int128_t int128_t; // PPC64-QUADWORD-ATOMICS:[[TMP3:%.*]] = load atomic i128, ptr [[TMP1:%.*]] acquire, align 16 // // PPC64-LABEL: @test_load( -// PPC64:call void @__atomic_load(i64 noundef 16, ptr noundef [[TMP3:%.*]], ptr noundef [[TMP4:

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -33,9 +33,9 @@ void test_i32_atomics(_Atomic(int32_t) * a, int32_t b) { } void test_i64_atomics(_Atomic(int64_t) * a, int64_t b) { - // LA32: call i64 @__atomic_load_8 - // LA32: call void @__atomic_store_8 - // LA32: call i64 @__atomic_fetch_add_8 + // LA32: load atomi

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-10 Thread James Y Knight via cfe-commits
@@ -1056,6 +1056,23 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBPframe pointer + // - R10

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread James Y Knight via cfe-commits
@@ -1056,6 +1056,23 @@ def CC_Intel_OCL_BI : CallingConv<[ CCDelegateTo ]>; +def CC_X86_64_Preserve_None : CallingConv<[ + // We don't preserve general registers, so all of them can be used to pass + // arguments except + // - RBPframe pointer + // - R10

[clang] d614874 - [Clang] Implement __builtin_source_location.

2022-03-28 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2022-03-28T18:29:02-04:00 New Revision: d61487490022aaacc34249475fac3e208c7d767e URL: https://github.com/llvm/llvm-project/commit/d61487490022aaacc34249475fac3e208c7d767e DIFF: https://github.com/llvm/llvm-project/commit

[clang] 8f66f13 - Fix memory leak in [Clang] Implement __builtin_source_location.

2022-03-29 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2022-03-29T17:32:59-04:00 New Revision: 8f66f1371981bda1af1ca43d505e1bc5836b3e36 URL: https://github.com/llvm/llvm-project/commit/8f66f1371981bda1af1ca43d505e1bc5836b3e36 DIFF: https://github.com/llvm/llvm-project/commit/8f66f1371981bda1af1ca43d505e1bc5836b3e36

[clang] caa1ebd - Don't assume that a new cleanup was added to InnermostEHScope.

2022-02-04 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2022-02-04T23:39:42-05:00 New Revision: caa1ebde70673ddb7124a0599ba846362a1f8b1e URL: https://github.com/llvm/llvm-project/commit/caa1ebde70673ddb7124a0599ba846362a1f8b1e DIFF: https://github.com/llvm/llvm-project/commit

[clang] 9545976 - Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-08 Thread James Y Knight via cfe-commits
Author: James Y Knight Date: 2022-02-08T14:34:44-05:00 New Revision: 9545976ff160e19805a84a06a7e59d446f9994d9 URL: https://github.com/llvm/llvm-project/commit/9545976ff160e19805a84a06a7e59d446f9994d9 DIFF: https://github.com/llvm/llvm-project/commit/9545976ff160e19805a84a06a7e59d446f9994d9

  1   2   3   4   5   6   7   8   9   >