[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/85425 >From c9a98ad15aa63c445e68b56621f5a1c8f0fc4219 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 14 Mar 2024 18:44:17 -0700 Subject: [PATCH 1/2] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver M

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-15 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-15 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-15 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if (A->getOption().matches(options::OPT_mno_unalign

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

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

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

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

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

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

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] b8db3e7 - [RISCV,test] Change two -munaligned-access to GCC-supported -mno-strict-align

2024-03-15 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-03-15T10:46:12-07:00 New Revision: b8db3e7c7dddaa14c314a05b92c9fa3df38734e4 URL: https://github.com/llvm/llvm-project/commit/b8db3e7c7dddaa14c314a05b92c9fa3df38734e4 DIFF: https://github.com/llvm/llvm-project/commit/b8db3e7c7dddaa14c314a05b92c9fa3df38734e4.diff

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/85350 >From 94997d2d43a4db288e81e7b4c61d4562645cc5d8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Mar 2024 19:04:53 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] cd07125 - [Driver] Don't alias -mstrict-align to -mno-unaligned-access

2024-03-15 Thread via cfe-commits
Author: Fangrui Song Date: 2024-03-15T10:50:21-07:00 New Revision: cd071253c70b3b37a0b9d113709ca9d49a83007e URL: https://github.com/llvm/llvm-project/commit/cd071253c70b3b37a0b9d113709ca9d49a83007e DIFF: https://github.com/llvm/llvm-project/commit/cd071253c70b3b37a0b9d113709ca9d49a83007e.diff

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
@@ -4347,6 +4362,19 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) { } } +/// Adds a declaration to the list of multi version functions if not present. +void CodeGenModule::AddDeferredMultiVersionResolverToEmit(GlobalDecl GD) { + const auto *FD = cast(GD.g

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85441 Follow-up to #85350: GCC only supports -m[no-]strict-align for AArch64 and rejects adding -m[no-]unaligned-access aliases. We inapropriated supported -m[no-]unaligned-access as aliases for non-AArch64 due to an ea

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes Follow-up to #85350: GCC only supports -m[no-]strict-align for AArch64 and rejects adding -m[no-]unaligned-access aliases. We inapropriated supported -m[no-]unaligned-access as aliases for non-AArch64 due to a

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Fangrui Song (MaskRay) Changes Follow-up to #85350: GCC only supports -m[no-]strict-align for AArch64 and rejects adding -m[no-]unaligned-access aliases. We inapropriated supported -m[no-]unaligned-access as aliases for non-AArch6

[clang] c9062e8 - Reapply [libomptarget] Build plugins-nextgen for SystemZ (#83978)

2024-03-15 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2024-03-15T19:06:43+01:00 New Revision: c9062e8f786864f86d330babce78a1926cc5b072 URL: https://github.com/llvm/llvm-project/commit/c9062e8f786864f86d330babce78a1926cc5b072 DIFF: https://github.com/llvm/llvm-project/commit/c9062e8f786864f86d330babce78a1926cc5b072.diff

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

2024-03-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: If Apple platforms need this option, I can keep it recognized but only for Apple. For ELF platforms, we should remove the GCC-unsupported-and-rejected aliases. https://github.com/llvm/llvm-project/pull/85441 ___ cfe-commits mailing lis

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-03-15 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH 01/14] [BoundsSafety] Introduce CountAttributedType CountAttributedTy

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

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

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. two nits https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -87,6 +87,7 @@ #include "llvm/Support/Process.h" #include "llvm/Support/Program.h" #include "llvm/Support/RISCVISAInfo.h" +#include "llvm/Support/Regex.h" MaskRay wrote: remove #include "llvm/Support/Regex.h" for clang/tools/driver/driver.cpp https://githu

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
@@ -87,6 +87,7 @@ #include "llvm/Support/Process.h" #include "llvm/Support/Program.h" #include "llvm/Support/RISCVISAInfo.h" +#include "llvm/Support/Regex.h" kastiglione wrote: thanks for catching that https://github.com/llvm/llvm-project/pull/85425 _

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/85425 >From c9a98ad15aa63c445e68b56621f5a1c8f0fc4219 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 14 Mar 2024 18:44:17 -0700 Subject: [PATCH 1/3] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver M

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/85425 >From c9a98ad15aa63c445e68b56621f5a1c8f0fc4219 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 14 Mar 2024 18:44:17 -0700 Subject: [PATCH 1/4] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver M

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Dave Lee via cfe-commits
@@ -6677,3 +6678,136 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { + return SavedStrings.insert(std::string(S)).first->c_str(); +} + +///

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -6677,3 +6678,134 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl &Args, return llvm::Error::success(); } + +namespace { + +const char *GetStableCStr(std::set &SavedStrings, StringRef S) { MaskRay wrote: We prefer `static` for functions http

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -839,6 +839,13 @@ llvm::Error expandResponseFiles(SmallVectorImpl &Args, bool ClangCLMode, llvm::BumpPtrAllocator &Alloc, llvm::vfs::FileSystem *FS = nullptr); +/// Apply a space separated list of edits to the

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
@@ -4347,6 +4362,19 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) { } } +/// Adds a declaration to the list of multi version functions if not present. +void CodeGenModule::AddDeferredMultiVersionResolverToEmit(GlobalDecl GD) { + const auto *FD = cast(GD.g

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-03-15 Thread via cfe-commits
https://github.com/hdoc updated https://github.com/llvm/llvm-project/pull/84726 >From ec3f444913d9162de4494cdb09b336b1b00380fa Mon Sep 17 00:00:00 2001 From: hdoc Date: Mon, 11 Mar 2024 01:13:25 -0700 Subject: [PATCH 1/4] Comment parsing: add argument parsing for @throw @throws @exception Doxy

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo &Op); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/85424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/85424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
@@ -252,6 +252,116 @@ double3 ceil(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil) double4 ceil(double4); +//===--===// +// clamp builtins +//===--

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
@@ -132,12 +134,60 @@ static bool expandRcpIntrinsic(CallInst *Orig) { return true; } +static Intrinsic::ID getCorrectMaxIntrinsic(Type *elemTy, +Intrinsic::ID clampIntrinsic) { bogner wrote: I could see us needin

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Andy Kaylor via cfe-commits
@@ -794,8 +834,10 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo &Op) { ResR = Builder.CreateFSub(AC, BD, "mul_r"); ResI = Builder.CreateFAdd(AD, BC, "mul_i"); - if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Limited || - Op.

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/84405 >From 6a495010024b93bb8871eebe6e10c62d1f5d2fc5 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 7 Mar 2024 22:25:13 + Subject: [PATCH] [FMV] Emit the resolver along with the default version d

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Joshua Cranmer via cfe-commits
@@ -310,6 +310,13 @@ class ComplexExprEmitter CGF.getContext().getFloatTypeSemantics(ElementType); const llvm::fltSemantics &HigherElementTypeSemantics = CGF.getContext().getFloatTypeSemantics(HigherElementType); +// Check that LongDouble Size > Double S

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Joshua Cranmer via cfe-commits
@@ -310,6 +310,13 @@ class ComplexExprEmitter CGF.getContext().getFloatTypeSemantics(ElementType); const llvm::fltSemantics &HigherElementTypeSemantics = CGF.getContext().getFloatTypeSemantics(HigherElementType); +// Check that LongDouble Size > Double S

[clang] [llvm] [openmp] [OpenMP] Increment kernel args version, used by runtime for detecting dyn_ptr. (PR #85363)

2024-03-15 Thread Jeff Sandoval via cfe-commits
jeffreysandoval wrote: > > > The versioning is required to support use cases where code generated by > > > an older compiler is linked with a newer runtime. > > > > > > Is that supported? > > I think compatibility across released versions is not supported in upstream > LLVM. But downstream,

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Andy Kaylor via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo &Op); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/84405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Allow fmv without default declaration. (PR #85454)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/85454 This was a limitation which has now been lifted upon request. Please read the thread below for more details: https://github.com/llvm/llvm-project/pull/84405#discussion_r1525583647 Basically it allows to

[clang] [FMV] Allow fmv without default declaration. (PR #85454)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexandros Lamprineas (labrinea) Changes This was a limitation which has now been lifted upon request. Please read the thread below for more details: https://github.com/llvm/llvm-project/pull/84405#discussion_r1525583647 B

[clang] [FMV] Allow fmv without default declaration. (PR #85454)

2024-03-15 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: I think I messed up the review, this is based on #84405 so it shows unrelated changes. Ignore for now. I'll rebase https://github.com/llvm/llvm-project/pull/85454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Farzon Lotfi via cfe-commits
@@ -132,12 +134,60 @@ static bool expandRcpIntrinsic(CallInst *Orig) { return true; } +static Intrinsic::ID getCorrectMaxIntrinsic(Type *elemTy, +Intrinsic::ID clampIntrinsic) { farzonl wrote: Will do. As an asid

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-15 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/3] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [clang-repl] Fix assertion failure in CleanUpPTU() (PR #85378)

2024-03-15 Thread Stefan Gränitz via cfe-commits
@@ -375,16 +375,22 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { TranslationUnitDecl *MostRecentTU = PTU.TUPart; TranslationUnitDecl *FirstTU = MostRecentTU->getFirstDecl(); if (StoredDeclsMap *Map = FirstTU->getPrimaryContext()->getLookupPtr()) {

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

2024-03-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85458 Setting GCC_INSTALL_PREFIX leads to a warning (#77537). Link: discourse.llvm.org/t/add-gcc-install-dir-deprecate-gcc-toolchain-and-remove-gcc-install-prefix/65091 Link: discourse.llvm.org/t/correct-cmake-parame

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

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

[clang] [clang-repl] Fix assertion failure in CleanUpPTU() (PR #85378)

2024-03-15 Thread Stefan Gränitz via cfe-commits
@@ -375,16 +375,22 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { TranslationUnitDecl *MostRecentTU = PTU.TUPart; TranslationUnitDecl *FirstTU = MostRecentTU->getFirstDecl(); if (StoredDeclsMap *Map = FirstTU->getPrimaryContext()->getLookupPtr()) {

[clang] [llvm] [AArch64] Add support for Cortex-A520AE and Cortex-A720AE CPUs (PR #85401)

2024-03-15 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/85401 >From 4faf1f908c0c7ddef2833be3dd1b87b3abf302d8 Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Thu, 14 Mar 2024 09:26:34 + Subject: [PATCH] [AArch64] Add support for Cortex-A520AE and Cortex-A720AE

[clang] Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions" (PR #85353)

2024-03-15 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > Reverts #84599 > > This broke the presubmit bot. Any logs to show what was broken? https://github.com/llvm/llvm-project/pull/85353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang-format] Fix a bug in annotating FunctionDeclarationName (PR #85361)

2024-03-15 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/85361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix: constexpr bit_cast with empty base classes (PR #82383)

2024-03-15 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/82383 >From ed6a576ba0c9492f8aa4c995ea7316263a979fae Mon Sep 17 00:00:00 2001 From: sethp Date: Tue, 20 Feb 2024 08:57:13 -0800 Subject: [PATCH 1/2] fix: constexpr bit_cast with empty base classes Prior to this commit, c

[clang] fix: constexpr bit_cast with empty base classes (PR #82383)

2024-03-15 Thread via cfe-commits
sethp wrote: @cor3ntin @tbaederr is there anything else you need from me here? I would expect github's "squash and merge" button to work fine for this change, but I could rebase if you'd prefer. https://github.com/llvm/llvm-project/pull/82383 ___ cfe

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Paul Schwabauer via cfe-commits
koplas wrote: Using `-fgen-reduced-bmi` currently fails for me with a case that looks like this: ```C++ // a.hpp template void ignore(T const &) noexcept {} inline void resultCheck(char const *message) { ignore(message); } // b.cppm module; #include "a.hpp" expor

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-15 Thread Ahmed Bougacha via cfe-commits
@@ -2085,6 +2099,37 @@ void AArch64AsmPrinter::emitMachOIFuncStubHelperBody(Module &M, .addImm(2), *STI); + if (TM.getTargetTriple().isArm64e()) { +// autibsp ahmedbougacha wrote: Leave

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-03-15 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 01/12] [Clang][Sema] Print more static_assert exprs This change int

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Alex Voicu (AlexVlx) Changes Currently, the builtins used for implementing `va_list` handling unconditionally take their arguments as unqualified `ptr`s i.e. pointers to AS 0. This does not work for targets where the default

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-03-15 Thread via cfe-commits
sethp wrote: Ping @cor3ntin @cjdb —this one definitely needs a rebase from me, but I don't want to do that if y'all have a review in progress. https://github.com/llvm/llvm-project/pull/74852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang-repl] Fix assertion failure in CleanUpPTU() (PR #85378)

2024-03-15 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -375,16 +375,22 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { TranslationUnitDecl *MostRecentTU = PTU.TUPart; TranslationUnitDecl *FirstTU = MostRecentTU->getFirstDecl(); if (StoredDeclsMap

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,22 @@ +// REQUIRES: spirv-registered-target jrtc27 wrote: Does it actually? Normally -emit-llvm works regardless of the enabled backends https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailin

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 commented: Some minor comments, but otherwise would be good to see this upstream. We've had this downstream in CHERI LLVM for many years and never got round to upstreaming it. https://github.com/llvm/llvm-project/pull/85460

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,22 @@ +// REQUIRES: spirv-registered-target +// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm -o - %s | FileCheck %s +struct x { + double b; + long a; +}; + +void testva(int n, ...) { + __builtin_va_list ap; + __builtin_va_start(ap, n)

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,22 @@ +// REQUIRES: spirv-registered-target +// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm -o - %s | FileCheck %s +struct x { + double b; + long a; +}; + +void testva(int n, ...) { + __builtin_va_list ap; + __builtin_va_start(ap, n)

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
@@ -1713,7 +1716,7 @@ def int_coro_subfn_addr : DefaultAttrsIntrinsic< ///===-- Other Intrinsics --===// // -// TODO: We should introduce a new memory kind fo traps (and other side effects +// TODO: We should introduce a new m

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-15 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,22 @@ +// REQUIRES: spirv-registered-target +// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm -o - %s | FileCheck %s +struct x { jrtc27 wrote: Newline before https://github.com/llvm/llvm-project/pull/85460 __

[clang] [openmp] [docs] Prefer --gcc-install-dir= to deprecated GCC_INSTALL_PREFIX (PR #85458)

2024-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/85458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2024-03-15 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/85465 Only NSObject we can trust the layout of won't change even though we cannot directly see its @implementation >From 3c66561377e5bfdbb3eefa658da63f68026e5a2e Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 15

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: AtariDreams (AtariDreams) Changes Only NSObject we can trust the layout of won't change even though we cannot directly see its @implementation --- Full diff: https://github.com/llvm/llvm-project/pull/85465.diff 2 Files Affected:

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AtariDreams (AtariDreams) Changes Only NSObject we can trust the layout of won't change even though we cannot directly see its @implementation --- Full diff: https://github.com/llvm/llvm-project/pull/85465.diff 2 Files Affected: - (mod

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-15 Thread David Li via cfe-commits
https://github.com/david-xl commented: Why is a new user facing option needed? I suppose this can be done under -fdebug-info-for-profiling. An internal option can also be added to disable it. https://github.com/llvm/llvm-project/pull/81545 ___ cfe-com

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Nikita Popov via cfe-commits
nikic wrote: @antoniofrighetto You need to update the PR description, not the commit message. https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] ca4c4a6 - Revert "[clang][nullability] allow _Nonnull etc on nullable class types (#82705)"

2024-03-15 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2024-03-15T21:55:37+01:00 New Revision: ca4c4a6758d184f209cb5d88ef42ecc011b11642 URL: https://github.com/llvm/llvm-project/commit/ca4c4a6758d184f209cb5d88ef42ecc011b11642 DIFF: https://github.com/llvm/llvm-project/commit/ca4c4a6758d184f209cb5d88ef42ecc011b11642.diff LO

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Paul Schwabauer via cfe-commits
koplas wrote: Do I miss something? The performance and file size is similar with and without `-fgen-reduced-bmi`. To reproduce clone https://github.com/koplas/clang-modules-test and run `build.sh` and `build_thin_bmi.sh`. https://github.com/llvm/llvm-project/pull/85050

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @nikic, updated PR description as well, thanks. https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-03-15 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/65996 >From 1492d6362a1a4f6d65fb7001bdefb5250f30754e Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Wed, 16 Aug 2023 09:17:12 -0700 Subject: [PATCH] [AArch64][PAC] Support and document ptrauth builtins and

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-03-15 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/65996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0481f04 - [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (#65996)

2024-03-15 Thread via cfe-commits
Author: Ahmed Bougacha Date: 2024-03-15T14:17:21-07:00 New Revision: 0481f049c37029d829dbc0c0cc5d1ee71c6d1c9a URL: https://github.com/llvm/llvm-project/commit/0481f049c37029d829dbc0c0cc5d1ee71c6d1c9a DIFF: https://github.com/llvm/llvm-project/commit/0481f049c37029d829dbc0c0cc5d1ee71c6d1c9a.diff

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-03-15 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha closed https://github.com/llvm/llvm-project/pull/65996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/85424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-15 Thread Jon Roelofs via cfe-commits
@@ -2085,6 +2099,37 @@ void AArch64AsmPrinter::emitMachOIFuncStubHelperBody(Module &M, .addImm(2), *STI); + if (TM.getTargetTriple().isArm64e()) { +// autibsp jroelofs wrote: Is there a

[clang] [llvm] [CodeGen][AArch64][FMV] PAC the stub_helper's frame on arm64e (PR #84704)

2024-03-15 Thread Ahmed Bougacha via cfe-commits
@@ -2085,6 +2099,37 @@ void AArch64AsmPrinter::emitMachOIFuncStubHelperBody(Module &M, .addImm(2), *STI); + if (TM.getTargetTriple().isArm64e()) { +// autibsp ahmedbougacha wrote: There

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-15 Thread Nathan Sidwell via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-15 Thread via cfe-commits
https://github.com/scythris created https://github.com/llvm/llvm-project/pull/85470 This resolves an issue in clang-format where `new` and `delete` were incorrectly formatted as keywords in C files. The fix modifies `TokenAnnotator::spaceRequiredBetween` to handle `new` and `delete` when used

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-15 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (scythris) Changes This resolves an issue in clang-format where `new` and `delete` were incorrectly formatted as keywords in C files. The fix modifies `TokenAnnotator::spaceRequiredBetween` to handle `new` and `delete` when us

<    1   2   3   4   >