[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/73730 >From 3e500c2a7c6b7895ebe292a1ed50e04409ba149c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Nov 2023 17:17:54 -0800 Subject: [PATCH 1/4] [Clang] Generate the GEP instead of adding AST nodes ---

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -0,0 +1,86 @@ +// Test case for scanning input of GCC output as multilib config topperc wrote: Are we using GCC? https://github.com/llvm/llvm-project/pull/73765 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,129 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This funciton will try to re-use multi-lib if they are compat

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/73734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
@@ -4997,6 +4997,19 @@ ASTReader::ASTReadResult ASTReader::readUnhashedControlBlockImpl( F->SearchPathUsage[I] = true; break; } +case VFS_USAGE: { + if (!F) +break; + unsigned Count = Record[0]; + const char *Byte = Blob.data();

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: It's odd to me that tracking is enabled by default. I would have expected tracking be off by default and enabled explicitly for scanning. Similarly, in the modulemap case it could save-and-restore rather than enable the tracking if it was previously o

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
@@ -498,11 +518,18 @@ class NamedNodeOrError { } // namespace detail /// An in-memory file system. -class InMemoryFileSystem : public FileSystem { +class InMemoryFileSystem : public RTTIExtends { std::unique_ptr Root; std::string WorkingDirectory; bool UseNormalizedPa

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I added the codegen code owners for opinions, but personally, I prefer the direction this patch is heading over the one in https://github.com/llvm/llvm-project/pull/73465 https://github.com/llvm/llvm-project/pull/73730

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -956,42 +956,70 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-29 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73305 >From 5aba2f1d2fe34f721a8e85eef6eecc25cb60851f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/5] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics

[llvm] [libcxx] [clang] [openmp] [flang] [OpenMP][NFC] Separate OpenMP/OpenACC specific mapping code (PR #73817)

2023-11-29 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/73817 >From ed1513641d575c4a2881613864c892aff7855a78 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Tue, 28 Nov 2023 18:51:23 -0800 Subject: [PATCH] [OpenMP][NFC] Separate OpenMP/OpenACC specific mapping code

[llvm] [libcxx] [clang] [openmp] [flang] [OpenMP][NFC] Separate OpenMP/OpenACC specific mapping code (PR #73817)

2023-11-29 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert closed https://github.com/llvm/llvm-project/pull/73817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: @MaskRay > It does not make sense for MSVC. Let me share a bit of background here. While porting SerenityOS's libraries to Windows and, specifically, to `x86_64-pc-windows-msvc`, we discovered a few tests that were mysteriously failing. It turned out that the change in beha

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: @AaronBallman It's not letting me comment on your comment. While a compound literal doesn't have a DRE, it's also not a flexible array, so it's not supposed to get this far. https://github.com/llvm/llvm-project/pull/73730 ___ cfe-com

[clang] 2f1399c - clang/APINotes: fix parenthesization of &&, ||

2023-11-29 Thread Ramkumar Ramachandra via cfe-commits
Author: Ramkumar Ramachandra Date: 2023-11-29T18:53:30Z New Revision: 2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98 URL: https://github.com/llvm/llvm-project/commit/2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98 DIFF: https://github.com/llvm/llvm-project/commit/2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98.dif

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/73730 >From 3e500c2a7c6b7895ebe292a1ed50e04409ba149c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Nov 2023 17:17:54 -0800 Subject: [PATCH 1/5] [Clang] Generate the GEP instead of adding AST nodes ---

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[libc] [compiler-rt] [llvm] [flang] [clang] [libcxx] [msan] Intercept mallinfo2 (PR #73729)

2023-11-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/73729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [mlir] [clang] [clang-tools-extra] [clang] Fix a bug with qualified name lookup into current instantiation (PR #73018)

2023-11-29 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/73018 >From 0275f3ea50b3f410d2132d61ea406131de6c Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 21 Nov 2023 08:32:36 -0800 Subject: [PATCH 1/2] [clang] Fix a bug with qualified name lookup int

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman It's not letting me comment on your comment. While a compound > literal doesn't have a DRE, it's also not a flexible array, so it's not > supposed to get this far. Note that this method should only be executed if > the flexible array member exists and has th

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/73730 >From 3e500c2a7c6b7895ebe292a1ed50e04409ba149c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Nov 2023 17:17:54 -0800 Subject: [PATCH 1/6] [Clang] Generate the GEP instead of adding AST nodes ---

[clang] 8f564a1 - [RISCV] Remove reference to non-existant __builtin_riscv_sha512sum0l/__builtin_riscv_sha512sum1l.

2023-11-29 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-11-29T11:06:49-08:00 New Revision: 8f564a1f30c160635a8225af5d20669ee42b468a URL: https://github.com/llvm/llvm-project/commit/8f564a1f30c160635a8225af5d20669ee42b468a DIFF: https://github.com/llvm/llvm-project/commit/8f564a1f30c160635a8225af5d20669ee42b468a.diff

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: > > @AaronBallman It's not letting me comment on your comment. While a compound > > literal doesn't have a DRE, it's also not a flexible array, so it's not > > supposed to get this far. Note that this method should only be executed if > > the flexible array member exists and h

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-29 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce bound

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[libc] [compiler-rt] [llvm] [flang] [clang] [libcxx] [msan] Intercept mallinfo2 (PR #73729)

2023-11-29 Thread Ramkumar Ramachandra via cfe-commits
artagnon wrote: Hi, this commit broke the buildbot: ``` /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/test/msan/Linux/mallinfo.cpp:12:26: error: invalid use of incomplete type 'mallinfo2' 12 | struct mallinfo2 mi2 = mallinfo2(); |

[clang] [HLSL] Vector standard conversions (PR #71098)

2023-11-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/71098 >From 91e8d9d9f63fe2ac481bb01549e3d69ac59d68f8 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 1 Nov 2023 12:18:43 -0500 Subject: [PATCH 1/5] [HLSL] Vector vector standard conversions HLSL supports v

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/73730 >From 3e500c2a7c6b7895ebe292a1ed50e04409ba149c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Nov 2023 17:17:54 -0800 Subject: [PATCH 1/7] [Clang] Generate the GEP instead of adding AST nodes ---

[clang] [HLSL] Vector standard conversions (PR #71098)

2023-11-29 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/71098 >From 91e8d9d9f63fe2ac481bb01549e3d69ac59d68f8 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 1 Nov 2023 12:18:43 -0500 Subject: [PATCH 1/6] [HLSL] Vector vector standard conversions HLSL supports v

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -956,42 +956,72 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
@@ -956,42 +956,70 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -const Expr * +namespace { + +struct MemberExprBaseVisitor +: public StmtVisitor { + MemberExprBaseVisitor() = default; + + //===--

[clang] [HLSL] Vector standard conversions (PR #71098)

2023-11-29 Thread Chris B via cfe-commits
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema &S, SourceLocation Loc, /// GetConversionRank - Retrieve the implicit conversion rank /// corresponding to the given implicit conversion kind. ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am now confused by the subject "[clang] Stub out gcc_struct attribute". Do you mean "Implement gcc_struct attribute"? But the description isn't clear that this patch changes `-mms-bitfields` and `ms_struct` to be respected for windows-msvc targets. SerenityOS is an OS, indepen

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

2023-11-29 Thread Owen Pan via cfe-commits
@@ -1464,6 +1467,21 @@ class AnnotatingParser { } } + void parseEmbedDirective() { +if (CurrentToken && CurrentToken->is(tok::less)) { + next(); + while (CurrentToken) { +// Mark tokens up to the trailing line comments as implicit string +/

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Andrew Kaster via cfe-commits
ADKaster wrote: > SerenityOS is an OS, independent from Windows. What does porting it to > Windows mean? Build some SerenityOS components on Windows targeting the PE > object file format? In this case, Dan is referring to future plans to port the Ladybird browser to x86_64-windows-msvc. The b

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: This should be ready for a final review now. https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-29 Thread Aaron Ballman via cfe-commits
@@ -1464,6 +1467,21 @@ class AnnotatingParser { } } + void parseEmbedDirective() { +if (CurrentToken && CurrentToken->is(tok::less)) { + next(); + while (CurrentToken) { +// Mark tokens up to the trailing line comments as implicit string +/

[llvm] [clang-tools-extra] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-29 Thread via cfe-commits
elizabethandrews wrote: > I requested some minor changes. > > Can we document the `.ifunc` symbols as a deprecated feature? With this > change, they will never be referenced except by code compiled by older > compiler versions. Maybe plan to deprecate them a year from now? How/where do I docu

[llvm] [clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-11-29 Thread David Li via cfe-commits
https://github.com/david-xl created https://github.com/llvm/llvm-project/pull/73845 Update the user manual to provide guidance on the usage for different flavors of instrumentations. >From b2c9081a0c3d5a982c2a23857bf986ec80c83cb5 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 27 Nov 2023

[clang] [llvm] Fix documentation on PGO/coverage related options. (PR #73845)

2023-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo @llvm/pr-subscribers-llvm-transforms Author: David Li (david-xl) Changes Update the user manual to provide guidance on the usage for different flavors of instrumentations. --- Full diff: https://github.com/llvm/llvm-project/pull/73845.diff 2 File

[libcxx] [flang] [compiler-rt] [clang] [llvm] [libc] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-29 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/73465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [llvm] [flang] [clang] [compiler-rt] [libcxx] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: Closing in favor of https://github.com/llvm/llvm-project/pull/73730. https://github.com/llvm/llvm-project/pull/73465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-29 Thread via cfe-commits
@@ -4114,8 +4114,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) { ResolverCon

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: @MaskRay > I am now confused by the subject "[clang] Stub out gcc_struct attribute". The user-facing change is `[[gcc_struct]]` attribute implemented for Itanium C++ ABI. Better handling of `-mms-bitfields` is just a byproduct. I agree that commit message should be more spe

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-29 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,362 @@ +== +``-fbounds-safety``: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +``-fbounds-safety`` is a C extension to enforce bound

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: CodeGenFunction::FindCountedByField finds a field with a corresponding base expression. Currently, it throws away the base expression. And the code you've just written tries to recompute the base. Instead of doing this dance, can we just make CodeGenFunction::FindCounte

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > `-mms-bitfields` is a GCC x86 specific option (`aarch64-linux-gnu-gcc > -mms-bitfields -xc /dev/null -E` => `error: unrecognized command-line option > ‘-mms-bitfields’`). While it is implemented as an x86 specific option in GCC right now, that doesn't mean that it only is su

[libcxx] [flang] [compiler-rt] [clang] [llvm] [libc] [msan] Intercept mallinfo2 (PR #73729)

2023-11-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Should be fixed with 771e9cda239c12ebc3aec65d8a6fd861b2c9e4dc https://github.com/llvm/llvm-project/pull/73729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0041d6d - [𝘀𝗽𝗿] changes introduced through rebase

2023-11-29 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2023-11-29T12:23:50-08:00 New Revision: 0041d6d015ae98b29820f649160c60a90c7c4220 URL: https://github.com/llvm/llvm-project/commit/0041d6d015ae98b29820f649160c60a90c7c4220 DIFF: https://github.com/llvm/llvm-project/commit/0041d6d015ae98b29820f649160c60a90c7c4220.diff L

[clang] eafbe06 - [𝘀𝗽𝗿] changes introduced through rebase

2023-11-29 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2023-11-29T12:23:57-08:00 New Revision: eafbe063de80818d4a9e2714bf317fa759550f39 URL: https://github.com/llvm/llvm-project/commit/eafbe063de80818d4a9e2714bf317fa759550f39 DIFF: https://github.com/llvm/llvm-project/commit/eafbe063de80818d4a9e2714bf317fa759550f39.diff L

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-11-29 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Ping https://github.com/llvm/llvm-project/pull/73177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NVPTX] Allow passing arguments to the linker while standalone (PR #73030)

2023-11-29 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Ping https://github.com/llvm/llvm-project/pull/73030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Minor improvements/cleanup to target attribute handling. NFC (PR #73851)

2023-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes Use ArrayRef to avoid a vector copy. Replace a push_back loop with a call to std::vector::insert. --- Full diff: https://github.com/llvm/llvm-project/pull/73851.diff 1 Files Affected: - (modified) clang/li

[clang] [RISCV] Minor improvements/cleanup to target attribute handling. NFC (PR #73851)

2023-11-29 Thread Craig Topper via cfe-commits
@@ -265,11 +264,11 @@ resolveTargetAttrOverride(const std::vector &FeaturesVec, if (I == FeaturesVec.end()) return FeaturesVec; - const std::vector FeaturesNeedOverride(FeaturesVec.begin(), I); + ArrayRef FeaturesNeedOverride(&*FeaturesVec.begin(), &*I); -

[clang] 1cbd52f - [Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on Enumerations (#73105)

2023-11-29 Thread via cfe-commits
Author: cor3ntin Date: 2023-11-29T21:27:17+01:00 New Revision: 1cbd52f791d3f088246526c0801634edb65cee31 URL: https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31 DIFF: https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31.diff LOG:

[clang] [Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on… (PR #73105)

2023-11-29 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/73105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3313c25 - [RISCV] Fix a couple copy/paste mistakes in riscv_crypto.h. NFC

2023-11-29 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2023-11-29T12:31:46-08:00 New Revision: 3313c256c82e16e6f15a182bbf77ad2d60548a56 URL: https://github.com/llvm/llvm-project/commit/3313c256c82e16e6f15a182bbf77ad2d60548a56 DIFF: https://github.com/llvm/llvm-project/commit/3313c256c82e16e6f15a182bbf77ad2d60548a56.diff

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Microsoft bit-field layout didn't break an overly-specific regression test > but rendered unusable double to string conversion. The culprit was the > following snippet: > > ```c++ > union Extractor { > double value; > struct { > bool sign : 1; > u32 exponent : 11;

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-29 Thread via cfe-commits
@@ -6226,6 +6226,15 @@ ExprResult Sema::CheckConvertedConstantExpression(Expr *From, QualType T, return R; } +ExprResult Sema::EvaluateConvertedConstantExpression(Expr *E, QualType T, + APValue &Value, +

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: > CodeGenFunction::FindCountedByField finds a field with a corresponding base > expression. Currently, it throws away the base expression. And the code > you've just written tries to recompute the base. Instead of doing this dance, > can we just make CodeGenFunction::FindCount

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'd like to see a few tests involving multiple arrows in the same expression. (If my understanding is correct, you want to cut the recursion when you see an arrow member.) Looking at the code again, I guess FindCountedByField doesn't explicitly compute the base expressio

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: Yes, I know by now :) But this requires using the same type for all the bit-fields which might lead to unnecessary casts in the algorithm itself. And the other case is not as easy to fix. https://github.com/llvm/llvm-project/pull/71148

[clang] [RISCV] Minor improvements/cleanup to target attribute handling. NFC (PR #73851)

2023-11-29 Thread Alex Bradbury via cfe-commits
https://github.com/asb approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/73851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-29 Thread Richard Smith via cfe-commits
@@ -112,6 +112,9 @@ template constexpr int f(T t) { // expected-note {{'f' defined here}} return id(t); // expected-note {{'f' is an immediate function because its body contains a call to a consteval function 'id' and that call is not a constant expression}} } + + +

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-29 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thanks! I assume you'll also be looking at the variable case (perhaps as a separate commit)? https://github.com/llvm/llvm-project/pull/73463 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Bill Wendling via cfe-commits
bwendling wrote: > I'd like to see a few tests involving multiple arrows in the same expression. > (If my understanding is correct, you want to cut the recursion when you see > an arrow member.) Correct. I'll add the code and some testcases. > Looking at the code again, I guess FindCountedByF

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: > Therefore I don't think it's too relevant to implement -mno-ms-bitfields for > MSVC targets (as I guess it could open a huge can of worms). I want to only alter the layout of explicit fields in the class with the future MSVC `-mno-ms-bitfields` implementation. This is alway

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: One more thing. Re binary compatibility concerns: `-mno-ms-bitfields` on MinGW is an equally-sized footgun as on MSVC. Without proper header annotation with `#pragma ms_struct on`, either of them will silently make an ABI mismatch. However, for some reason, supporting `-mno-m

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-29 Thread Zaara Syeda via cfe-commits
@@ -0,0 +1,69 @@ +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 %s -triple=powerpc-ibm-aix-xcoff -S -mtocdata=h,g,f,e,d,c,b,a,globalOneWithAlias,globalTwoWithAlias,ll,t3 -verify -emit-llvm -o - | FileCheck %s -check-prefix=CHECK --match-full-lines +// RUN: %clang_cc

[clang] 4c17452 - [clang-format][NFC] Extend isProto() to also cover LK_TextProto (#73582)

2023-11-29 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-29T12:52:01-08:00 New Revision: 4c1745207665262380e9bff65201816a966339d0 URL: https://github.com/llvm/llvm-project/commit/4c1745207665262380e9bff65201816a966339d0 DIFF: https://github.com/llvm/llvm-project/commit/4c1745207665262380e9bff65201816a966339d0.diff LOG:

[clang] [clang-format][NFC] Extend isProto() to also cover LK_TextProto (PR #73582)

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

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > One more thing. Re binary compatibility concerns: `-mno-ms-bitfields` on > MinGW is an equally-sized footgun as on MSVC. Without proper header > annotation with `#pragma ms_struct on`, either of them will silently make an > ABI mismatch. However, for some reason, supporting `

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-29 Thread Zaara Syeda via cfe-commits
https://github.com/syzaara updated https://github.com/llvm/llvm-project/pull/67999 >From dced11bd242aba08158a5a0a399b2b0ea7381a69 Mon Sep 17 00:00:00 2001 From: Zaara Syeda Date: Thu, 28 Sep 2023 15:01:56 -0400 Subject: [PATCH 1/3] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX This patc

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 7d2ee902f1fb1dc0cd355b4b51fda32309f45ccb Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/5] [CodeGen] Add conditional to module cloning in bitcode linkin

[clang] bbae59a - [clang-format] Finalize children after formatting them (#73753)

2023-11-29 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-29T12:56:05-08:00 New Revision: bbae59ae71c73e26809d4ab7da1a80239ebd9381 URL: https://github.com/llvm/llvm-project/commit/bbae59ae71c73e26809d4ab7da1a80239ebd9381 DIFF: https://github.com/llvm/llvm-project/commit/bbae59ae71c73e26809d4ab7da1a80239ebd9381.diff LOG:

[clang] [clang-format] Finalize children after formatting them (PR #73753)

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

[clang] [CodeGen] Add conditional to module cloning in bitcode linking (PR #72478)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/72478 >From 5bfc0608073cd699e42a23b07d68b4572a14fcbd Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 Nov 2023 22:06:46 -0800 Subject: [PATCH 1/5] [CodeGen] Add conditional to module cloning in bitcode linkin

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 4c1745207665262380e9bff65201816a966339d0 f23461ad86202ae37947c5ad1099e301b23b3589 --

[clang] 0123608 - [RISCV] Minor improvements/cleanup to target attribute handling. NFC (#73851)

2023-11-29 Thread via cfe-commits
Author: Craig Topper Date: 2023-11-29T12:57:48-08:00 New Revision: 0123608822a7b58d6deca528eef8dc958420acd1 URL: https://github.com/llvm/llvm-project/commit/0123608822a7b58d6deca528eef8dc958420acd1 DIFF: https://github.com/llvm/llvm-project/commit/0123608822a7b58d6deca528eef8dc958420acd1.diff

[clang] [RISCV] Minor improvements/cleanup to target attribute handling. NFC (PR #73851)

2023-11-29 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/73851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-11-29 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Some examples to consider: ``` // Crazy array indexing... but strictly speaking, legal. struct S { int count; int arr[] __attribute((counted_by(count))); }; int f1(int c, struct S *var) { return var[10].arr[10]; } // Double dereferenced variable. int f2(int c, struct S **v

[clang] [clang-offload-bundler] Add support for -check-input-archive (PR #73709)

2023-11-29 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/73709 >From 995706601f9f4aed021a9003ad79ca3e7e1d18af Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 28 Nov 2023 14:42:11 -0800 Subject: [PATCH 1/5] [clang-offload-bundler] Add support for -check-input-archive

[clang] 328fd36 - [clang][CGStmtOpenMP] Remove unneeded calls to CreatePointerBitCastOrAddrSpaceCast (NFC)

2023-11-29 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-29T14:59:27-06:00 New Revision: 328fd363daabb464670613dece6c75cf99d03410 URL: https://github.com/llvm/llvm-project/commit/328fd363daabb464670613dece6c75cf99d03410 DIFF: https://github.com/llvm/llvm-project/commit/328fd363daabb464670613dece6c75cf99d03410.diff

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-29 Thread Zaara Syeda via cfe-commits
@@ -0,0 +1,16 @@ +; RUN: not --crash llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s --check-prefix CHECK-ERROR +; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s --check-prefix CHECK-ERROR + +@a = global [5 x i16] zeroinitializer, alig

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-29 Thread Dan Klishch via cfe-commits
DanShaders wrote: Okay, @mstorsjo @MaskRay, what is the way forward? Am I right that, as for the user-facing changes, `[[gcc_struct]]` cancelling implicit `-mms-bitfilds` on MinGW is fine and silently ignoring `-m{no-}ms-bitfields` on `windows-msvc` is not? When exactly should we disallow `-m

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-29 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > The manual change says "the TOC data transformation will be applied to [...] > block-scope static variables". But later, you mention "internal linkage", > which is a bit confusing when you're dealing with C++. Block-scope static > variables don't have "linkage"

[llvm] [clang] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > It's odd to me that tracking is enabled by default. I would have expected > tracking be off by default and enabled explicitly for scanning. Similarly, in > the modulemap case it could save-and-restore rather than enable the tracking > if it was previously off. It has to be

[llvm] [clang] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Michael Spencer via cfe-commits
@@ -498,11 +518,18 @@ class NamedNodeOrError { } // namespace detail /// An in-memory file system. -class InMemoryFileSystem : public FileSystem { +class InMemoryFileSystem : public RTTIExtends { std::unique_ptr Root; std::string WorkingDirectory; bool UseNormalizedPa

[llvm] [clang] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Michael Spencer via cfe-commits
@@ -142,6 +142,21 @@ std::vector HeaderSearch::computeUserEntryUsage() const { return UserEntryUsage; } +std::vector HeaderSearch::computeVFSUsage() const { + std::vector VFSUsage; + llvm::vfs::FileSystem &RootFS = FileMgr.getVirtualFileSystem(); + // TODO: This only wor

[compiler-rt] [flang] [clang] [libc] [llvm] [libcxx] Ensure `lli --force-interpreter` disables the OrcJIT too (PR #73717)

2023-11-29 Thread Alex Light via cfe-commits
https://github.com/allight updated https://github.com/llvm/llvm-project/pull/73717 >From a1064c7c866741bba6489279cd27b499e5bd0a62 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 28 Nov 2023 15:30:54 -0800 Subject: [PATCH] Ensure --force-interpreter disables the ORCjit too Unless the ORCJi

<    1   2   3   4   5   >