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

2024-01-03 Thread Andrew Pinski via cfe-commits
@@ -416,6 +416,12 @@ added in the future: This calling convention, like the `PreserveMost` calling convention, will be used by a future version of the ObjectiveC runtime and should be considered experimental at this time. +"``preserve_nonecc``" - The `PreserveNone`

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Andrew Pinski via cfe-commits
pinskia wrote: One question since the attribute is applied to types is there a way to get the nolock/noalloc from type?. e.g. ``` template [[nolock(T)]] void f(T a) { a(); } ``` Will the above work or is there no way to implement that currently? Since you mention it is attached to the type, is

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the corresponding GCC bug is at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99312 (and there was a patch posted but never reviewed; https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566322.html). https://github.com/llvm/llvm-project/pull/81493 _

[clang] nolock/noalloc attributes (PR #84983)

2024-03-12 Thread Andrew Pinski via cfe-commits
pinskia wrote: Does it make sense to have some C testcases too? Likewise some testcases testing the __attribute__ style attribute? I would say more testcases the better really. https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing li

[clang] [clang-tools-extra] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-09-10 Thread Andrew Pinski via cfe-commits
pinskia wrote: https://github.com/itanium-cxx-abi/cxx-abi/issues/74 https://github.com/llvm/llvm-project/pull/89446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Andrew Pinski via cfe-commits
pinskia wrote: Reference to https://github.com/llvm/llvm-project/issues/55894 . https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-04 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the corresponding GCC patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650664.html https://github.com/llvm/llvm-project/pull/91022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-04 Thread Andrew Pinski via cfe-commits
pinskia wrote: I don't think you can use x16 and x17 for argument passing due to them being reserved for PLTs and call veneers. https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-05 Thread Andrew Pinski via cfe-commits
@@ -5658,17 +5658,20 @@ experimental at this time. def PreserveNoneDocs : Documentation { let Category = DocCatCallingConvs; let Content = [{ -On X86-64 target, this attribute changes the calling convention of a function. +On X86-64 and AArch64 targets, this attribute chang

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-16 Thread Andrew Pinski via cfe-commits
pinskia wrote: Well assume attribute is a good example of where gcc and clang disagree and might cause issues. Gcc implemented the assume attribute just the same as the standard one. While clang implemented before standardization and now they differ and could cause issues. This is why I reques

[clang] [C] Disable use of NRVO (PR #101038)

2024-08-01 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the C++ issue with NRVO is https://cplusplus.github.io/CWG/issues/2868.html . https://github.com/llvm/llvm-project/pull/101038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Andrew Pinski via cfe-commits
pinskia wrote: >From my point of view this looks like a decent documentation of this >extension. Note I filed the original bug because I noticed both GCC and clang >didn't document this extension. (I filed GCC here: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117689 which I got try fix next

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-08 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note GCC already treats `void*` as being compatiable with all other pointers and has since GCC 6 (when it started to disambiguates accesses to different pointers). I don't think it is documented though. Another example where clang/LLVM handles void pointers differently from GCC:

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-08 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note GCC's testcase testsuite/gcc.dg/alias-14.c is testcase for this extension: "as an extension we consider void * universal. Writes to it should alias." https://github.com/llvm/llvm-project/pull/122116 ___ cfe-commits mailing list cfe

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Andrew Pinski via cfe-commits
pinskia wrote: What is the definition of current target? Is it the current subtarget? Or is it returning true even when NOT using `#pragma GCC target` (or the target attribute) even if the builtin is not work for the subtarget? This is unrelated to offloading but is similar issue. With respect

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Andrew Pinski via cfe-commits
pinskia wrote: Maybe the problem with the name I am having is the word `has`. Maybe `__can_use_builtin` seems like a better name. And that seems like would be a good context sensative clue. https://github.com/llvm/llvm-project/pull/126324 ___ cfe-com

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-14 Thread Andrew Pinski via cfe-commits
pinskia wrote: I submitted https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118882 to ask the other GCC folks about what they think is a good idea because I have no other thoughts on this; I just think something needs to be done. https://github.com/llvm/llvm-project/pull/126324 ___

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-24 Thread Andrew Pinski via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s pinskia wrote: > This feels like a pretty bare bones set of tests, I think we can do better. > > For example, it has been discussed that there should not be side effects, > let's verify that

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the GCC implementtion of __builtin_is_modifiable_lvalue that I have implemented (unlike __builtin_constant_p which in some but not all cases) throws away the full expression that is inside __builtin_is_modifiable_lvalue since it is fully implemented in the parser rather tha

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread Andrew Pinski via cfe-commits
@@ -12985,6 +12985,16 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, assert(Src.isInt()); return Success((Src.getInt() & (Alignment - 1)) == 0 ? 1 : 0, E); } + case Builtin::BI__builtin_is_modifiable_lvalue: { +const Expr *Arg = E->getArg(0);

[clang] [Sema] Fix tautological bounds check warning with -fwrapv (PR #120480)

2025-03-25 Thread Andrew Pinski via cfe-commits
pinskia wrote: Shouldn't this be part of -Wstrict-overflow instead of -Wtautological-compare ? https://github.com/llvm/llvm-project/pull/120480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-