[clang] [clang][docs] Pass full path of source TD file to gen_rst_from_td. [NFC] (PR #66497)

2023-09-15 Thread Tom Stellard via cfe-commits
https://github.com/tstellar commented: Where else will the .td files be? In the build directory? https://github.com/llvm/llvm-project/pull/66497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Re-apply "[Parse] Split incremental-extensions" (PR #66446)

2023-09-15 Thread Ben Barham via cfe-commits
bnbarham wrote: Any objections to this @vgvassilev? https://github.com/llvm/llvm-project/pull/66446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157615: [ExtendLifetimes][1/4] Add "disable-post-ra" function attribute to disable the post-regalloc scheduler

2023-09-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Might be worth rewording the commit, or splitting it - I'd say the introduction of `optdebug` should be the noteworthier part of this patch (or whichever patch introduces it) - so either "this patch adds optdebug, and a first/exemplar use of it in postra scheduler"

[PATCH] D158223: [clang] Add clang::unnamed_addr attribute that marks globals' address as not significant

2023-09-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14524 + VD->hasAttr() && + (!VD->getType().isPODType(getASTContext()) || + !VD->getType().isConstQualified())) { aeubanks wrote: > rnk wrote: > > I don't think `isPODType`

[clang] [clang-format][NFC] Clean up signatures of some parser functions (PR #66569)

2023-09-15 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/66569 None >From d570d3bb4d0bf9a49b51c25857958988329d398f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 15 Sep 2023 21:59:47 -0700 Subject: [PATCH] [clang-format][NFC] Clean up signatures of some parser

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2023-09-15 Thread via cfe-commits
@@ -567,6 +567,58 @@ bool Sema::addInstantiatedCapturesToScope( return false; } +static void addDeclsFromParentScope(Sema , FunctionDecl *FD, +LocalInstantiationScope ) { + assert(isLambdaCallOperator(FD) && "FD must be a lambda call

[PATCH] D158238: Implement __builtin_fmaximum/fminimum*

2023-09-15 Thread Kunwar Shaanjeet Singh Grover via Phabricator via cfe-commits
Groverkss added a comment. LGTM, the fmaximum/fminimum fallback support backends has been blocking us for a while in IREE. This patch is a welcome addition to start the support for this. I will let @fhahn accept the patch, since I'm not an expert in this part of code. Repository: rG LLVM

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-15 Thread Fangrui Song via cfe-commits
@@ -390,6 +390,21 @@ StringRef stem(StringRef path, Style style = Style::native); /// @result The extension of \a path. StringRef extension(StringRef path, Style style = Style::native); +/// Get the program's name +/// +/// If the path ends with the string .exe, returns the

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM, but @jh7370 usually wants to have an eye on such changes. https://github.com/llvm/llvm-project/pull/65812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/65812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread via cfe-commits
@@ -525,8 +527,95 @@ static bool verifyFileExtensions( return AnyInvalid; } +static SmallString<256> makeAbsolute(llvm::StringRef Input) { + if (Input.empty()) +return {}; + SmallString<256> AbsolutePath(Input); + if (std::error_code EC =

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/15] [libc++] Prevent calling the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/15] [libc++] Prevent calling the projection more than three

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2023-09-15 Thread via cfe-commits
https://github.com/0x59616e resolved https://github.com/llvm/llvm-project/pull/65193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2023-09-15 Thread via cfe-commits
https://github.com/0x59616e resolved https://github.com/llvm/llvm-project/pull/65193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2023-09-15 Thread via cfe-commits
https://github.com/0x59616e updated https://github.com/llvm/llvm-project/pull/65193 >From 3eafb85ff74271456cba24ea5892dd5660c1d332 Mon Sep 17 00:00:00 2001 From: Sheng Date: Wed, 30 Aug 2023 11:44:23 +0800 Subject: [PATCH 1/3] [clang][Sema] Fix a bug when instantiating a lambda with requires

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-15 Thread FĂ©lix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. In D148381#4646833 , @rapidsna wrote: > `-fbounds-safety` doesn't allow this. In our internal adoption experience, we > haven't encountered such use cases yet. So, I think it's best to make the > model restrictive to avoid

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
kinu wrote: Thanks! Addressed comments. https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
@@ -288,6 +288,18 @@ static void insertIfFunction(const Decl , Funcs.insert(FD); } +static Expr *getRetValueFromSingleReturnStmtMethod(const CXXMemberCallExpr ) { + auto *D = cast_or_null(C.getMethodDecl()->getDefinition()); + if (!D) +return nullptr; + auto *S =

[clang] [MSVC, ARM64] Add _Copy* and _Count* intrinsics (PR #66554)

2023-09-15 Thread Eli Friedman via cfe-commits
@@ -10752,6 +10752,68 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Load; } + if (BuiltinID == AArch64::BI_CopyDoubleFromInt64 || + BuiltinID == AArch64::BI_CopyFloatFromInt32 || + BuiltinID == AArch64::BI_CopyInt32FromFloat ||

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
@@ -324,6 +336,12 @@ getFieldsGlobalsAndFuncs(const Stmt , FieldSet , } else if (auto *E = dyn_cast()) { insertIfGlobal(*E->getDecl(), Vars); insertIfFunction(*E->getDecl(), Funcs); + } else if (const auto *C = dyn_cast()) { +// If this is a method that returns

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu resolved https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
@@ -1446,6 +1446,51 @@ TEST(TransferTest, BaseClassInitializer) { llvm::Succeeded()); } +TEST(TransferTest, StructModeledFieldsWithAccessor) { + std::string Code = R"( +class S { + int *P; + int *Q; + int X; + int Y; + int Z; +public: +

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-15 Thread Kinuko Yasuda via cfe-commits
https://github.com/kinu updated https://github.com/llvm/llvm-project/pull/66368 >From d311f12fe3ca0d30a40e659236ba7eaccda24a8b Mon Sep 17 00:00:00 2001 From: Kinuko Yasuda Date: Thu, 14 Sep 2023 12:45:04 + Subject: [PATCH 1/4] [clang][dataflow] Model the fields that are accessed via inline

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-15 Thread Yeoul Na via Phabricator via cfe-commits
rapidsna added a comment. struct V { int Sizes[2]; int FAM[] __counted_by(Sizes[0]); // Thoughts? }; `-fbounds-safety` doesn't allow this. In our internal adoption experience, we haven't encountered such use cases yet. So, I think it's best to make the model restrictive to avoid

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: byval generally results in worse code. It has two problems: - The copy is invisible. Having the copy explicitly visible means we can optimize the code involved in the copy (sometimes we can eliminate it, or parts of it). - Gluing the allocation to the call means stack

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-15 Thread Ilya Leoshkevich via cfe-commits
iii-i wrote: Sorry, I my wording was not precise enough, it is indeed important that we create a copy, and not pass a pointer to the original. Still, what you described matches the s390x ABI: ``` 1.2.2.3. Parameter Area The parameter area shall be allocated by a calling function if some

[PATCH] D150075: Fix PR#62594 : static lambda call operator is not convertible to function pointer on win32

2023-09-15 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D150075#4646487 , @royjacobson wrote: > @shafik @aaron.ballman does any of you want to commandeer this diff? seems > simple enough of a change I think Aaron might be better since he is more familiar with Windows.

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[PATCH] D159292: [driver] Conditionally include installed libc++ headers for Android

2023-09-15 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D159292#4646811 , @rprichard wrote: > In D159292#4646096 , @smeenai wrote: > >> Ping. > > I asked a couple of other people at Google to take a look at the patches. > Someone should

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Change default PCH extension name from .gch to .pch (PR #66165)

2023-09-15 Thread Brad Smith via cfe-commits
https://github.com/brad0 approved this pull request. https://github.com/llvm/llvm-project/pull/66165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MSVC, ARM64] Add _Copy* and _Count* intrinsics (PR #66554)

2023-09-15 Thread Amy Huang via cfe-commits
https://github.com/amykhuang updated https://github.com/llvm/llvm-project/pull/66554 >From 2f18bc9802942e5fa08181026212ea711f9f16a9 Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Thu, 7 Sep 2023 11:32:17 -0700 Subject: [PATCH] [MSVC, ARM64] Add _Copy* and _Count* intrinsics ---

[PATCH] D159292: [driver] Conditionally include installed libc++ headers for Android

2023-09-15 Thread Ryan Prichard via Phabricator via cfe-commits
rprichard added a comment. In D159292#4646096 , @smeenai wrote: > Ping. I asked a couple of other people at Google to take a look at the patches. Someone should get to it next week I think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-15 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D148381#4646780 , @kees wrote: > In D148381#4645600 , @void wrote: > >> Added more error messages. Changed some code around to align with coding >> practices. Added some more test cases.

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-15 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 556884. d-smirnov added a comment. updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 Files: clang/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp

[clang] [MSVC, ARM64] Add _Copy* and _Count* intrinsics (PR #66554)

2023-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-platform-windows Changes Implement the _Count* and _Copy* Windows ARM intrinsics: ``` double _CopyDoubleFromInt64(__int64) float _CopyFloatFromInt32(__int32) __int32 _CopyInt32FromFloat(float) __int64 _CopyInt64FromDouble(double) unsigned int

[clang] [MSVC, ARM64] Add _Copy* and _Count* intrinsics (PR #66554)

2023-09-15 Thread Amy Huang via cfe-commits
https://github.com/amykhuang created https://github.com/llvm/llvm-project/pull/66554 Implement the _Count* and _Copy* Windows ARM intrinsics: ``` double _CopyDoubleFromInt64(__int64) float _CopyFloatFromInt32(__int32) __int32 _CopyInt32FromFloat(float) __int64 _CopyInt64FromDouble(double)

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-15 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov updated this revision to Diff 556881. d-smirnov added a comment. Herald added subscribers: cfe-commits, wangpc, zzheng. Herald added a project: clang. Relaxed checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/

[clang] [time-trace] Add a new time trace scope variable named "ParseDeclarationOrFunctionDefinition". (PR #65268)

2023-09-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: This seems fine to me, but it's hard to understand if this is redundant with some other "ParseFunction" scope from the tests. WDYT @MaskRay ? https://github.com/llvm/llvm-project/pull/65268 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: If anyone see any other alternative implementations or see some potential issues, then any comments are welcome. https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Changes Driver mode passed as an extra argument (command line or config) were not utilized for removing invalid arguments in stripPositionalArgs function, and even if passed as config driver mode were not used for dependency file striping

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/66553 Driver mode passed as an extra argument (command line or config) were not utilized for removing invalid arguments in stripPositionalArgs function, and even if passed as config driver mode were not used for

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/14] [libc++] Prevent calling the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/14] [libc++] Prevent calling the projection more than three

[clang] Honor -fno-sanitize-link-runtime for libclang_rt.asan_static (PR #66414)

2023-09-15 Thread via cfe-commits
colincross wrote: > Which branch exactly changed? https://github.com/llvm/llvm-project/pull/66414/commits/311cdea702b2d6c7264cbc3a3bd07ae0708ad4cd#diff-c89ebf1fc950679f63c19739a35aa966a12674f7d61af6fb382ab1fa0ee21dd7L1110 is the branch added by https://reviews.llvm.org/D122407 that wasn't

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-15 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. In D148381#4645600 , @void wrote: > Added more error messages. Changed some code around to align with coding > practices. Added some more test cases. Doing a full "allmodconfig" Linux kernel build with my 200ish __counted_by

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Both s390x and x86_64 ABIs require passing large structs via a pointer Wrong. x86_64 passes structs by value (copying the data into the argument list). It just looks like a pointer in the IR because LLVM can't really handle large values in registers. --- The

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-15 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-15 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[clang] a52560c - [clang] Remove spurious trailing whitespace

2023-09-15 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2023-09-15T17:26:16-04:00 New Revision: a52560c8dd804104041e3cde4d9b9b89bf22f81e URL: https://github.com/llvm/llvm-project/commit/a52560c8dd804104041e3cde4d9b9b89bf22f81e DIFF: https://github.com/llvm/llvm-project/commit/a52560c8dd804104041e3cde4d9b9b89bf22f81e.diff

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #66354)

2023-09-15 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/66354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ed94c6 - [clang-format] Fix a bug in ContinuationIndenter (#66354)

2023-09-15 Thread via cfe-commits
Author: Owen Pan Date: 2023-09-15T14:20:41-07:00 New Revision: 5ed94c6e3d30d342b7bc74facbcd0740d080c156 URL: https://github.com/llvm/llvm-project/commit/5ed94c6e3d30d342b7bc74facbcd0740d080c156 DIFF: https://github.com/llvm/llvm-project/commit/5ed94c6e3d30d342b7bc74facbcd0740d080c156.diff

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
https://github.com/ktf updated https://github.com/llvm/llvm-project/pull/66430 >From b952f0577dfe8112f394bd5392212f843c0cc86e Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+...@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:58:21 +0200 Subject: [PATCH 01/14] Introduce PagedVector

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-15 Thread via cfe-commits
https://github.com/xingxue-ibm edited https://github.com/llvm/llvm-project/pull/66549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Add coverage for constructor member initializers. (PR #66441)

2023-09-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/66441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0b8df84 - [Coverage] Add coverage for constructor member initializers. (#66441)

2023-09-15 Thread via cfe-commits
Author: Zequan Wu Date: 2023-09-15T17:06:04-04:00 New Revision: 0b8df841f951beb5690cd74c91bd54a8de31df14 URL: https://github.com/llvm/llvm-project/commit/0b8df841f951beb5690cd74c91bd54a8de31df14 DIFF: https://github.com/llvm/llvm-project/commit/0b8df841f951beb5690cd74c91bd54a8de31df14.diff

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Changes `unw_getcontext` saves the caller's registers in the context. However, if the caller of `unw_getcontext` is in a different module, the glue code of `unw_getcontext` sets the TOC register (r2) with the new TOC base and saves the

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-15 Thread via cfe-commits
https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/66549 `unw_getcontext` saves the caller's registers in the context. However, if the caller of `unw_getcontext` is in a different module, the glue code of `unw_getcontext` sets the TOC register (r2) with the new

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,33 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,33 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
https://github.com/EricWF requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread via cfe-commits
https://github.com/EricWF requested changes to this pull request. https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix math-errno issue (PR #66381)

2023-09-15 Thread Joshua Cranmer via cfe-commits
@@ -2313,14 +2313,20 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, FD->hasAttr() ? 0 : BuiltinID; bool ErrnoOverriden = false; - // True if math-errno is overriden via the + bool ErrnoOverrideValue = false;

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/13] [libc++] Prevent calling the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas updated https://github.com/llvm/llvm-project/pull/66315 >From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Wed, 13 Sep 2023 17:38:17 -0700 Subject: [PATCH 01/13] [libc++] Prevent calling the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-15 Thread Jocelyn Castellano via cfe-commits
https://github.com/pandaninjas resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); benlangmuir wrote: > This

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-15 Thread Ilya Leoshkevich via cfe-commits
iii-i wrote: I don't quite get why can't we use byval here. How is this different from x86_64? Both s390x and x86_64 ABIs require passing large structs via a pointer, why can x86_64 implement this using byval in LLVM and s390x can't? I agree that currently s390x backend does not handle it

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[PATCH] D145214: [TSAN] add support for riscv64

2023-09-15 Thread Alex Fan via Phabricator via cfe-commits
alexfanqi added a comment. In D145214#4646676 , @hiraditya wrote: > @alexfanqi are you still actively working on this? maybe we can move it to > github then. Yeah, but the patch is already complete and tsan functions well with tests passing on my

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar resolved https://github.com/llvm/llvm-project/pull/66430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-15 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

  1   2   3   4   5   >