[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 417042. hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added a comment. - Address review comments: Remove deleted non-operator member functions; add extra line to test Repository: rG LLVM Github Monorepo

[PATCH] D121992: [Clang] [Driver] Add option to set alternative toolchain path

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Driver/Driver.h:152 + /// Alternative toolchain path in prior to sysroot. + std::string OverlayToolChainPath; I don't understand the use of "in" in the comment. Perhaps "used" was

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2b.cpp:163 + +// Test whether lambda are correctly treated as implicitely constexpr under the relaxed c++23 rules. +int test_lambdas_implicitly_constexpr() { Fix

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:26 }; - struct Nonlit { Nonlit(); }; // expected-note {{not literal}} + struct Nonlit { // cxx2a-note {{'Nonlit' is not literal becaus}} +Nonlit();

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1904-1906 +if (!SemaRef.LangOpts.CPlusPlus2b && +CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(),

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:26 }; - struct Nonlit { Nonlit(); }; // expected-note {{not literal}} + struct Nonlit { // cxx2a-note {{'Nonlit' is not literal becaus}} +Nonlit();

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:17-22 +constexpr int g() { // expected-error {{constexpr function never produces a constant expression}} + goto test;// expected-note {{subexpression not

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > I think labels can be left as is. Yes, the `static`, `thread_local`, label, and `goto` cases would all categorically contribute to a IFNDR program in the older modes (and we currently reliably diagnose them in the definition context).

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1904-1906 +if (!SemaRef.LangOpts.CPlusPlus2b && +CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(),

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Sema/Weak.h:35 inline SourceLocation getLocation() const { return loc; } - void setUsed(bool Used=true) { used = Used; } - inline bool

[PATCH] D121441: [PowerPC][NFC] Add atomic alignments and ops tests for powerpc

2022-03-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:1 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -verify -triple powerpc-unkonwn-unknown -emit-llvm -o - %s | \ lkail wrote: >

[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition

2022-03-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: jamieschmeiser, aaron.ballman, chandlerc, cebowleratibm, w2yehia. Herald added a project: All. hubert.reinterpretcast requested review of this revision. Herald added a project: clang. Update

[PATCH] D121441: [PowerPC][NFC] Add atomic alignments and ops tests for powerpc

2022-03-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM with comment (not blocking). Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:1 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -verify -triple

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2b.cpp:101 + + auto b = [](int n) constexpr { +if (!n) I think a lambda marked `constexpr` and one that isn't has fundamental differences in behaviour in

[PATCH] D121441: [PowerPC][NFC] Add atomic alignments and ops tests for powerpc

2022-03-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:1 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -verify -triple powerpc-unkonwn-unknown -emit-llvm -o - %s | \ I am not sure about having a

[PATCH] D121441: [PowerPC][NFC] Add atomic alignments and ops tests for powerpc

2022-03-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:2-6 +// RUN: %clang_cc1 -verify -triple powerpc-unkonwn-unknown -emit-llvm -o - %s | \ +// RUN: FileCheck %s --check-prefixes=PPC,PPC32 +// RUN: %clang_cc1 -verify -triple

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @aaron.ballman @cor3ntin, are we confident that testing the non-lambda cases is sufficient to cover the lambda cases as well? I suggest using a pattern such as: int (*test_cxx2b_constexpr_label_in_body())() { auto qq = []() { label: return

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:16 +} + +constexpr int f(int x) { Add a `NonLiteral` case and a case with a labelled statement and no `goto`? Comment at:

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Noting for myself: Clang's status quo already has behaviours that are similar to P2242R3 in its C++20 mode despite those behaviours being non-conforming and contributing to binary compat breakage with GCC. This patch is not responsible for those

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111400#3376070 , @hubert.reinterpretcast wrote: > In C++2b, the `-Wc++20-compat` warning is produced for the places where we > warn above and is not produced for the places where we don't warn above. I'm not

[PATCH] D111400: [Clang] Implement P2242R3

2022-03-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @aaron.ballman, I haven't had a chance to look at the code in detail yet, but I would like to get on the same page about the error/warning behaviour. In the older modes, we stay conforming either - by producing the warning (when we know the user said

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-02-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with minor comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118670/new/

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-02-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Analysis/padding_c.c:7 // RUN: not %clang_analyze_cc1 -verify %s \ // RUN: -analyzer-checker=core \ Even if it works as-is, might be good to add `-Wno-aix-compat` here too since

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-01-31 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaTemplate/instantiate-attr.cpp:1 // RUN: %clang_cc1 -fsyntax-only -verify %s // expected-no-diagnostics Add `-Wno-aix-compat` instead? Comment at:

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with minor comment. Comment at: clang/test/Headers/Inputs/include/float.h:2 +#pragma once +#define FLOAT_LOCAL_DEF 1

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Headers/float.h:40-41 # undef LDBL_MANT_DIG -# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) ||

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. More comments may follow, but didn't want to delay the first one. Comment at: clang/lib/Headers/float.h:20-21 */ -#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \ -__STDC_HOSTED__ && __has_include_next()

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 402156. hubert.reinterpretcast edited the summary of this revision. hubert.reinterpretcast added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Refresh with full context Repository: rG LLVM Github Monorepo

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117587/new/ https://reviews.llvm.org/D117587 ___

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/InterfaceStubs/object.c:2 // RUN: %clang_cc1 -fvisibility default -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-TAPI %s -// RUN: %clang -fvisibility=default -c -o - %s | llvm-nm - 2>&1 |

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. We should update the description to reflect the cause more accurately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117587/new/ https://reviews.llvm.org/D117587

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, fyi, have vacation until January. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 ___ cfe-commits mailing list

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3178494 , @qiucf wrote: > Thanks for the reminder. Here GCC and Clang diverges in the handling of > `__ibm128`/`__float128` and `long double`. Not sure whether GCC will 'fix' > the behavior, but here

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1540 // Diagnose attempts to convert between __ibm128, __float128 and long double - // where such conversions currently can't be handled. + // in arithmetic or comparison. if

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3136543 , @qiucf wrote: > Because the piece of code will be expanded to: > > long double _Complex x; > > if ((__builtin_types_compatible_p(__typeof(creall(x)), _Float128) >?

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111400#3164301 , @cor3ntin wrote: > If the issue is regarding the support and extension warning in C++20 and > older modes, it's something I can address by conserving the status quo in > older versions. I

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, I'm on vacation (for 3 weeks). For the C++ side, I suggest having a test for the narrowing conversion diagnostic in C++. My recollection is that GCC's odd behaviour around the conditional operator has an analogue in its implementation of

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. It doesn't seem like the cases of implicit conversion that are expected to be allowed have been tested with C++? $ ./bin/clang -fsyntax-only -mcpu=pwr9 -mfloat128 -xc -<<<$'__ibm128 x; __float128 y; void f(void) { y = x; }' Return: 0x00:0 Tue Nov

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1542 + if (unsupportedTypeConversion(*this, LHSType, RHSType) && + ACK != ACK_Conditional && ACK != ACK_CompAssign) return QualType(); GCC does not allow compound

[PATCH] D113145: [Sema] Mark virtual method declaration in union as invalid

2021-11-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! fyi, I'll be on vacation for the next three weeks. I've added some additional reviewers to the patch based on prior reviews. Repository: rG

[PATCH] D113145: Remove two sema checkings as assertions introduced by D79719.

2021-11-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @ychen, an alternative fix would be to avoid getting asking for the layout for a broken `union` like this. Would it be appropriate to mark the `RecordDecl` in Sema such that `isInvalidDecl` returns true? Is that already happening? Repository: rG LLVM

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Lambda capture semantics mean that extensions or inconsistencies in constexpr evaluation result in binary-compatibility issues. struct NonLit { NonLit(); }; template constexpr int foo() { return 42; T t; } extern int g(void *);

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. A different "ouch" (and, yes, this is a regression from this patch): auto f = [](bool b) { if (b) return 42; static int x = 0; return x; }; constexpr int x = f(true); const int *p = Generates no diagnostics with this patch even with

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111400#3087877 , @aaron.ballman wrote: > So your concern is that allowing this patch to be used as an extension in > older language modes may change the behavior of existing code? Or is your > concern more

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/ibm128-cast.c:59 + // IEEE: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} + w + q; + // CHECK: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} It's controversial enough to consider, as

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111078#3063245 , @lkail wrote: > This LGTM as the start point to support int128 on AIX. We might need more > patches involving libraries in the LLVM monorepo, we can do that > progressively. Agreed (although

[PATCH] D111382: Support _Float128 and F128 literal in C mode

2021-10-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Are we sure this is wise? We know that any future standard C++ type can't be the same as `__float128` (without changing the latter) because `__float128` mangles the same as 128-bit `long double`. So by making `__float128` the same as `_Float128` in C,

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I am concerned that the general direction of this patch (to allow the previously ill-formed constexpr functions as an extension under older language levels) is based upon bugs/divergences-from-orthodoxy in Clang's implementation of C++20 (noting that the

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111078#3042913 , @daltenty wrote: > Good point, but the std::chrono::file_clock interface hasn't shipped yet on > the platform libc++, since it's currently still at a bit of a backlevel, so I > don't think

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Type alignment (16), choice of GPRs for argument passing (first available including r10), `va_arg` invocations, order of components (big endian), and calls to double/float conversions all check out. It may be reasonable to locate existing tests for these

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/test/CodeGen/PowerPC/int128_ldst.ll:31 ; CHECK-NEXT:mr 3, 5 ; CHECK-NEXT:blr entry: Confirming that this case matches GCC on AIX: ``` ld 4,8(3) ld 3,0(3) blr ```

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Making a change to whether a platform has `__int128` affects the ABI of libc++'s `std::chrono::file_clock`. We should make sure the mitigation patch is posted and accepted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-09-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D106577#2983709 , @ThePhD wrote: > What it does mean is that Clang and every other compiler - so long as they > pick a ISO10646-code point capable encoding for their `wchar_t` literals - > can define this

[PATCH] D108742: [WIP] Reclassify form-feed and vertical tab as vertical WS for the purposes of lexing.

2021-08-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I find the lack of changes to tests other than API unittests to be somewhat concerning. Indeed, I applied the patch and did not notice behaviour changes in how `\f` or `\v` were handled in various contexts sensitive to line-termination. For example:

[PATCH] D107786: [AIX]: Fix option processing for -b

2021-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107786/new/ https://reviews.llvm.org/D107786

[PATCH] D107786: [AIX]: Fix option processing for -b

2021-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:271 // Handle reserved library options. -if (A.getOption().matches(options::OPT_Z_reserved_lib_stdcxx)) +else if

[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

2021-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:259 Builder.defineMacro("__PPC64__"); + // Also define _ARCH_PPC64 for 32-bit on AIX. + } else { Merge `else` with single `if`-statement as the sole contents of the

[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

2021-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:260 + } else { +if (getTriple().isOSAIX()) + Builder.defineMacro("_ARCH_PPC64"); cebowleratibm wrote: > A comment is warranted here to explain that __ARCH_PPC64

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with comment. Comment at: clang/test/Driver/aix-mcpu-default.c:9 -// Check that the target cpu defaults to power4 on AIX7.1 and below.

[PATCH] D106920: [AIX] Update fetch_and_add type

2021-07-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. Thanks. LGTM with minor nits. Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-fetch.c:19 // -void

[PATCH] D106914: [libclang] Check LLVM_HAVE_LINK_VERSION_SCRIPT

2021-07-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106914/new/ https://reviews.llvm.org/D106914

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-07-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D106577#2897588 , @aaron.ballman wrote: > In D106577#2897522 , @jyknight > wrote: > >> I'm not sure we should be populating this. >> >> The _value_ is determined by

[PATCH] D106371: [AIX] Generate large code model relocations when mcmodel=medium on AIX

2021-07-22 Thread Hubert Tong via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7d669ec1: [AIX] Generate large code model relocations when mcmodel=medium on AIX (authored by anjankgk, committed by hubert.reinterpretcast).

[PATCH] D106371: [AIX] Generate large code model relocations when mcmodel=medium on AIX

2021-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D106371#2894736 , @anjankgk wrote: > Anjan Kumar Guttahalli Krishna > > Thank you! I running a build with this now -- I'll check its status in the morning. CHANGES SINCE LAST ACTION

[PATCH] D106393: [PowerPC][AIX] Add support for varargs for complex types on AIX

2021-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4577-4583 + // If we have a complex type and the base type is smaller than 8 bytes, + // the ABI calls for the real and imaginary parts to be right-adjusted + // in separate

[PATCH] D106371: [AIX] Generate large code model relocations when mcmodel=medium on AIX

2021-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. LGTM with minor nit; thanks. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5140 +A->render(Args, CmdArgs); +} else D.Diag(diag::err_drv_invalid_argument_to_option) Add braces to the `else` block

[PATCH] D106074: [AIX] Emit unsupported 128-bit long double option for AIX

2021-07-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4845 + if (Arg *A = Args.getLastArg(options::OPT_mlong_double_128)) { +// AIX doesn't support 128-bit long double yet. +if (Triple.isOSAIX()) cebowleratibm

[PATCH] D104420: thread_local support for AIX

2021-07-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420

[PATCH] D104420: thread_local support for AIX

2021-07-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I think we're good after some last updates. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:340-342 + // Ignore all attributes except ConstInit when IgnoreAttrs is true. + bool isEmittedWithConstantInitializer(const VarDecl *VD, +

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:265 +/// Create a stub function, suitable for being passed to atexit, +/// which passes the given address to the given destructor function. Since the function has some

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2971 +isEmittedWithConstantInitializer(VD, true) && +!VD->needsDestruction(getContext())) { + // Emit a weak global function referring to the initialization

[PATCH] D104420: thread_local support for AIX

2021-07-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2966 +// other TUs will not know whether the initialization routine exists +// so create a weak, empty, init function to satisfy the linker. +// This is needed whenever a

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:3004 +} else if (CGM.getTriple().isOSAIX()) + // On AIX, all thread_local vars will have init routines regardless of + // whether they are const-initialized or not. Since

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:3003-3010 +} else if (CGM.getTriple().isOSAIX()) + // On AIX, all thread_local vars will have init routines regardless of + // whether they are const-initialized or not.

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4790 +llvm::Value *Arg2 = llvm::ConstantExpr::getBitCast( +cast(dtor.getCallee()), FpTy); +CGF.EmitNounwindRuntimeCall(AtExit, {Arg1, Arg2}); The

[PATCH] D104420: thread_local support for AIX

2021-07-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp:13 // LINUX: @_ZTH1r ={{.*}} alias void (), void ()* @__tls_init +// AIXX: @_ZTH1r ={{.*}} alias void (), void ()* @__tls_init // DARWIN: @_ZTH1r = internal alias

[PATCH] D104899: [clang][tests] Specify unwindlib in aix-ld tests

2021-06-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104899/new/ https://reviews.llvm.org/D104899

[PATCH] D103501: [clang][AIX] Enable inlined quadword atomic operations

2021-06-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/ppc64-quadword-atomics.c:10 + +// CHECK-NOT: call void @__atomic_exchange +// CHECK: +quadword-atomics lkail wrote: > hubert.reinterpretcast wrote: > > Can you add a link to something

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104803/new/ https://reviews.llvm.org/D104803

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:786 +<< PGOGenerateArg->getSpelling() << "-flto"; +if (ProfileGenerateArg) + D.Diag(diag::err_drv_unsupported_opt_for_target) Isn't this block of

[PATCH] D104803: [AIX] Emitting diagnostics error for profile options

2021-06-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Driver/unsupported-option.c:14 + +// RUN: not %clang -fprofile-generate --target=powerpc-ibm-aix %s 2>&1 | \ +// RUN: FileCheck %s --check-prefix=AIX-PROFILE-LTO Worthwhile to use the 64-bit

[PATCH] D103501: [clang][AIX] Enable inlined quadword atomic operations

2021-06-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/ppc64-quadword-atomics.c:10 + +// CHECK-NOT: call void @__atomic_exchange +// CHECK: +quadword-atomics Can you add a link to something that demonstrates that the implementation of

[PATCH] D102723: [HIP] Tighten checks in hip-include-path.hip test case

2021-06-07 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D102723#2790047 , @bjope wrote: > I relaxed the checks a bit again here: https://reviews.llvm.org/rGf0e10cc91bc4 > But it looks like the workers here > (https://lab.llvm.org/staging/#/workers/109) are paused so

[PATCH] D102723: [HIP] Tighten checks in hip-include-path.hip test case

2021-06-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a subscriber: gkistanova. hubert.reinterpretcast added a comment. In D102723#2790047 , @bjope wrote: > But it looks like the workers here > (https://lab.llvm.org/staging/#/workers/109) are paused so hard to tell if it >

[PATCH] D102723: [HIP] Tighten checks in hip-include-path.hip test case

2021-05-29 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. This change is causing failures when the build is done from a working directory that has symlinks: https://lab.llvm.org/staging/#/builders/126/builds/529/steps/5/logs/FAIL__Clang__hip-include-path_hip Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D99901: [Driver][test] Test intended target only

2021-05-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Driver/nostdincxx.cpp:4 // RUN: not %clangxx -nostdlibinc %s 2>&1 | FileCheck %s -// RUN: not %clangxx -fsyntax-only -nostdinc -nostdinc++ %s 2>&1 | FileCheck /dev/null

[PATCH] D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched

2021-05-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/pre-ra-sched.c:1-2 +// RUN: %clang %s -mllvm -pre-RA-sched=fast -c -o - | FileCheck %s +// RUN: %clang %s -mllvm -pre-RA-sched=linearize -c -o - | FileCheck %s + TaoPan wrote: >

[PATCH] D102814: [AIX] Print printable byte list as quoted string

2021-05-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with minor comments; thanks! Comment at: llvm/include/llvm/MC/MCAsmInfo.h:268-270 + /// This directive allows emission of an ascii

[PATCH] D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched

2021-05-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/pre-ra-sched.c:1-2 +// RUN: %clang %s -mllvm -pre-RA-sched=fast -c -o - | FileCheck %s +// RUN: %clang %s -mllvm -pre-RA-sched=linearize -c -o - | FileCheck %s + hubert.reinterpretcast

[PATCH] D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched

2021-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/pre-ra-sched.c:1-2 +// RUN: %clang %s -mllvm -pre-RA-sched=fast -c -o - | FileCheck %s +// RUN: %clang %s -mllvm -pre-RA-sched=linearize -c -o - | FileCheck %s + The test as was

[PATCH] D102814: [AIX] Print printable byte list as quoted string

2021-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/lib/MC/MCAsmStreamer.cpp:1007-1008 +static inline bool isPrintableString(StringRef Data) { + const auto BeginPtr = Data.begin(), EndPtr = Data.end(); + for (const unsigned char C : make_range(BeginPtr, EndPtr)) { +

[PATCH] D102715: Fix LIT failure on native aix

2021-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/struct-packed-align.c:170 +#elif defined(_AIX) +// On AIX, [bool, char, short] bitfields have the same alignment as unsigned +// int. Xiangling_L wrote: > aaron.ballman wrote: > >

[PATCH] D102715: [AIX] Fix LIT failure on native aix

2021-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. This LGTM. I've added additional reviewers based on the history of the file in case they will have comments. Please hold on committing this until tomorrow.

[PATCH] D102715: [AIX] Fix LIT failure on native aix

2021-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. From the comment, it seems the code as-is fails to test the property intended. It seems we want this: struct packed_chars { char a : 8, b : 8, c : 8, d : 4; char e : 8 __attribute__((packed)); char f : 4, g : 8, h : 8, i : 8; }; extern

[PATCH] D102688: [clang-repl] Better match the underlying architecture.

2021-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102688/new/ https://reviews.llvm.org/D102688

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-05-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D96033#2764946 , @hubert.reinterpretcast wrote: >> If that works on your platform I will happily open a review for the changes. > > From the behaviour observed in the 64-bit build, the 32-bit case might not >

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-05-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D96033#2762182 , @v.g.vassilev wrote: > That patch should probably get us to a point where we can mark the test as > `XFAIL: system-aix` I've applied that patch to my 64-bit LLVM build and it does cause the

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-05-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D96033#2762056 , @v.g.vassilev wrote: > IIUC, AIX has a default `fno-integrated-as` and I am still puzzled (and > cannot find the relevant code) what is the program action kind for AIX in > that case

<    1   2   3   4   5   6   7   8   >