[clang] [clang][RISC-V] fixed fp calling convention for fpcc eligible structs for risc-v (PR #110690)

2024-10-03 Thread Craig Topper via cfe-commits
@@ -1710,7 +1710,7 @@ struct float16_int64_s f_ret_float16_int64_s(void) { // LP64: entry: // // LP64F-LP64D-LABEL: define dso_local void @f_float16_int64bf_s_arg -// LP64F-LP64D-SAME: (half [[TMP0:%.*]], i64 [[TMP1:%.*]]) #[[ATTR0]] { topperc wrote: I looked

[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

2024-10-03 Thread Erich Keane via cfe-commits
@@ -1511,6 +1511,9 @@ static bool IsOverloadOrOverrideImpl(Sema &SemaRef, FunctionDecl *New, auto NewObjectType = New->getFunctionObjectParameterReferenceType(); auto OldObjectType = Old->getFunctionObjectParameterReferenceType(); + if (NewObjectType.isConstQ

[clang] [clang][RISC-V] fixed fp calling convention for fpcc eligible structs for risc-v (PR #110690)

2024-10-03 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread via cfe-commits
davidtrevelyan wrote: > > With the function effects warnings (as errors) activated, blocking > > functions cannot be called from non-blocking functions, and this is > > enforced at compile time. The purpose of this series of PRs is to introduce > > similar functionality into RealtimeSanitizer,

[clang] [Clang] Automatically enable `-fconvergent-functions` on GPU targets (PR #111076)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This patch causes us to respect the `-fconvergent-functions` and `-fno-convergent-functions` options correctly. GPU targets should have this set all the time, but we now offer `-fno-convergent-functio

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-10-03 Thread Congcong Cai via cfe-commits
@@ -15,20 +16,24 @@ using namespace clang::ast_matchers; namespace clang::tidy::bugprone { void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher( - returnStmt( - hasReturnValue(declRefExpr( - to(parmVarD

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-10-03 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: For some codes, I get the following error for a gfx906: ``` LLVM ERROR: Relocation for CG Profile could not be created: unknown relocation name ``` I see it for OpenMC, but the following is a simpler example: ``` $ cat test.c #include #include __attribute__((noinline)) d

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: >From page 113 and 114 of: >https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf "As a special case, the last element of a structure with more than one named member may have an incomplete array type; this is called a flexible array member. In most situations, the flexible a

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: After looking at the assembly produced by gcc more, it actually looks like it's using the allocation size if it's known in the current context (for example if the struct was just malloced in the same function) and otherwise returns INT_MAX for the __bdos of a struct containing a f

[clang] [clang][ExtractAPI] Fix up casting from CXXClassRecord (PR #110983)

2024-10-03 Thread Erick Velez via cfe-commits
https://github.com/evelez7 approved this pull request. https://github.com/llvm/llvm-project/pull/110983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread Erich Keane via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-03 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. I can not reproduce linux bot issue with the patch. https://github.com/llvm/llvm-project/pull/80007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: ah there's more context in https://reviews.llvm.org/D123964 https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: So, we would actually get gcc's behavior with this patch: ``` diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index c864714182e0..21ffe7b46a6e 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -1049,25 +1049,7 @@ Cod

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: I see that MMI really is a Codegen concept and not a Target concept, so that's why it takes an LLVMTargetMachine instead of TargetMachine. However, the `static_cast`s everywhere are extremely unfortunate. And it doesn't make sense to make the return type

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-10-03 Thread Joel E. Denny via cfe-commits
@@ -1311,4 +1314,96 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llvm

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-10-03 Thread via cfe-commits
trcrsired wrote: > Similarly it'd be excellent if clang supported equivalents to clang-cl's > `/winsdkdir` and `/vctoolsdir`, though these probably couldn't be smooshed > into existing options like `/winsysroot` can with `--sysroot`. @zmodem @godvino I strongly oppose making ```/winsysroot``

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-10-03 Thread Peilin Ye via cfe-commits
@@ -522,6 +526,28 @@ let Predicates = [BPFNoALU32] in { } def STD : STOREi64; +class relaxed_store + : PatFrag<(ops node:$val, node:$ptr), (base node:$val, node:$ptr)> { + let IsAtomic = 1; + let IsAtomicOrderingReleaseOrStronger = 0; +} + +class releasing_store + : PatFra

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-10-03 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,153 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sarah Spall (spall) Changes Implements elementwise firstbithigh hlsl builtin. Implements firstbituhigh intrinsic for spirv and directx, which handles unsigned integers Implements firstbitshigh intrinsic for spirv and directx, which

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-03 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/111082 Implements elementwise firstbithigh hlsl builtin. Implements firstbituhigh intrinsic for spirv and directx, which handles unsigned integers Implements firstbitshigh intrinsic for spirv and directx, which handles s

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-03 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 5114758b1cacb9c93c6a3c5b842d67b06d1152f7 e9ed9f9a0415544781f8334b305eb3916fc0862c --e

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-03 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/111082 >From e9ed9f9a0415544781f8334b305eb3916fc0862c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 23 Sep 2024 22:10:59 + Subject: [PATCH 1/2] implement firstbithigh hlsl builtin --- clang/include/clang/Ba

[clang] Use the XL pragma pack semantics on z/OS (PR #111053)

2024-10-03 Thread Sean Perry via cfe-commits
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/111053 - set the default on z/OS to use the XL pragma semantics - add in additional pragma pack values such as twobyte & reset supported by XL on z/OS >From 8f5b11f92dec5072d50a7930fa501c9039b6af26 Mon Sep 17 00:00:0

[clang] Use the XL pragma pack semantics on z/OS (PR #111053)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Sean Perry (perry-ca) Changes - set the default on z/OS to use the XL pragma semantics - add in additional pragma pack values such as twobyte & reset supported by XL on z/OS --- Full diff: https://github.

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
@@ -106,16 +106,18 @@ class MachineModuleInfo { const Function *LastRequest = nullptr; ///< Used for shortcut/cache. MachineFunction *LastResult = nullptr; ///< Used for shortcut/cache. - MachineModuleInfo &operator=(MachineModuleInfo &&MMII) = delete; + /// Deleted copy

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
@@ -1162,6 +1165,7 @@ void EmitAssemblyHelper::RunCodegenPipeline( // does not work with the codegen pipeline. // FIXME: make the new PM work with the codegen pipeline. legacy::PassManager CodeGenPasses; + std::unique_ptr MMI; aeubanks wrote: can this j

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-03 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Can't comment on fuchsia, but buildbot_standard.sh which is mentioned on original review was shutdown for a while. Some steps were moved to buildbot_cmake.sh based bots, I can try those. https://github.com/llvm/llvm-project/pull/80007 __

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-03 Thread David Majnemer via cfe-commits
https://github.com/majnemer approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread Finn Plummer via cfe-commits
@@ -2653,6 +2653,21 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, .addUse(GR.getSPIRVTypeID(ResType)) .addUse(GR.getOrCreateConstInt(3, I, IntTy, TII)); } + case Intrinsic::spv_wave_read_lane_at: { +assert(I.getNumOperands() == 4);

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

2024-10-03 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks commented: I'm still trying to wrap my head around LLVMTargetMachine vs TargetMachine, let me do some reading https://github.com/llvm/llvm-project/pull/110443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Finn Plummer (inbelic) Changes - create a clang built-in in Builtins.td - add semantic checking in SemaHLSL.cpp - link the WaveReadLaneAt api in hlsl_intrinsics.h - add lowering to spirv backend op GroupNonUniformShu

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Finn Plummer (inbelic) Changes - create a clang built-in in Builtins.td - add semantic checking in SemaHLSL.cpp - link the WaveReadLaneAt api in hlsl_intrinsics.h - add lowering to spirv backend op GroupNonUniformShuff

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes - create a clang built-in in Builtins.td - add semantic checking in SemaHLSL.cpp - link the WaveReadLaneAt api in hlsl_intrinsics.h - add lowering to spirv backend op GroupNonUniformShuffle

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Finn Plummer (inbelic) Changes - create a clang built-in in Builtins.td - add semantic checking in SemaHLSL.cpp - link the WaveReadLaneAt api in hlsl_intrinsics.h - add lowering to spirv backend op GroupNonUniformShuffle

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic for spirv backend (PR #111010)

2024-10-03 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MSVC] work-around for compile time issue 102513 (PR #110986)

2024-10-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Thanks! https://github.com/llvm/llvm-project/pull/110986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MSVC] work-around for compile time issue 102513 (PR #110986)

2024-10-03 Thread Reid Kleckner via cfe-commits
@@ -1430,6 +1434,10 @@ bool Interpret(InterpState &S, APValue &Result) { } } } +// https://github.com/llvm/llvm-project/issues/102513 +#if defined(_MSC_VER) rnk wrote: Please make the ifdef conditions match, or define your own macro like DEOPTIMIZE_SWIT

[clang] [MSVC] work-around for compile time issue 102513 (PR #110986)

2024-10-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/110986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: I'm gonna write a better explanation with some drawings of my arguments in a bit, but to start of with, clang's answer is inconsistent. If you rewrite the reproducer in the issue to this version without the `__attribute__((counted_by(a_count)))`, and compile with `-O2`, clang says

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The value clang computes is the difference between the address of the beginning of the struct, and the end of the array (or the end of the struct, if the array fits in the padding). The value gcc computes is that, plus the offset between the beginning of the array and the

[clang] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2024-10-03 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/111035 >From e8d355c9cd165e0a255bbbfb5b0126cf7b1461a6 Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Wed, 2 Oct 2024 12:56:43 -0500 Subject: [PATCH 1/6] initial work for pragma export & _Export keyword --- clang/in

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-03 Thread Vlad Serebrennikov via cfe-commits
@@ -203,6 +203,9 @@ namespace cwg1762 { // cwg1762: 14 float operator ""E(const char *); // since-cxx11-error@-1 {{invalid suffix on literal; C++11 requires a space between literal and identifier}} // since-cxx11-warning@-2 {{user-defined literal suffixes not starting wi

[clang-tools-extra] issue-63565: community requested small QoL fix for more configurabili… (PR #108005)

2024-10-03 Thread via cfe-commits
Darkproduct wrote: This is too bad. I was just looking for this feature. https://github.com/llvm/llvm-project/pull/108005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread via cfe-commits
https://github.com/davidtrevelyan created https://github.com/llvm/llvm-project/pull/111055 # Clang CodeGen for [[clang::blocking]] with RTSan Follows https://github.com/llvm/llvm-project/pull/106754 and https://github.com/llvm/llvm-project/pull/109543. This is the final patch for the feature.

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread Erich Keane via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (davidtrevelyan) Changes # Clang CodeGen for [[clang::blocking]] with RTSan Follows https://github.com/llvm/llvm-project/pull/106754 and https://github.com/llvm/llvm-project/pull/109543. This is the final patch for the feature. ##

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (davidtrevelyan) Changes # Clang CodeGen for [[clang::blocking]] with RTSan Follows https://github.com/llvm/llvm-project/pull/106754 and https://github.com/llvm/llvm-project/pull/109543. This is the final patch for the featu

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not sure what you think you're proving with that example; without the counted_by, we can't compute the size of the struct, so we just fall back to returning the size of the allocation. https://github.com/llvm/llvm-project/pull/111015 ___

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread via cfe-commits
davidtrevelyan wrote: @cjappl for review (and please could you also request reviews from the key interested parties?) PS I'll apply for membership after this PR so I hope this is the last time you'll have to do this for me :) https://github.com/llvm/llvm-project/pull/111055 __

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-03 Thread Erich Keane via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: > My default stance would be that gcc and the Linux code in question are wrong. > We could reconsider if strict checking is impractical for Linux, but I'd > expect kernel devs to prefer catching accesses one past the end of the array. If you access the array none of this really ma

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Chris Apple via cfe-commits
https://github.com/cjappl approved this pull request. Will wait to merge for a bit to let others chime in, but LGTM https://github.com/llvm/llvm-project/pull/111055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
fmayer wrote: > With the function effects warnings (as errors) activated, blocking functions > cannot be called from non-blocking functions, and this is enforced at compile > time. The purpose of this series of PRs is to introduce similar functionality > into RealtimeSanitizer, so that it can

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Bill Wendling via cfe-commits
bwendling wrote: I wrote a similar conclusion to @efriedma-quic in the email thread. The problem with your example is that, in the absence of the `counted_by` attribute, the `__builtin_dynamic_object_size` uses the `alloc_size` attribute that's implicit on the `malloc` call. https://github.co

[clang] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2024-10-03 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/111035 >From e8d355c9cd165e0a255bbbfb5b0126cf7b1461a6 Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Wed, 2 Oct 2024 12:56:43 -0500 Subject: [PATCH 1/7] initial work for pragma export & _Export keyword --- clang/in

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-10-03 Thread Stephen Tozer via cfe-commits
@@ -211,6 +211,16 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-lifetimes`` and ``-fextend-this-ptr`` flags have been ad

[clang] [libc++] Remove unused HAVE_LIBCXXABI variable from Android cache (PR #111007)

2024-10-03 Thread Ryan Prichard via cfe-commits
https://github.com/rprichard approved this pull request. https://github.com/llvm/llvm-project/pull/111007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/111065 Conditional operators that emit a branch go through a codepath which attaches metadata to that branch. But if we take a shortcut to emit a select directly, we end up skipping that code, and don't emit the

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-03 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: I slightly changed my mind. Was gonna write that gcc is definitely right, now I'm more at a 50/50. I got two arguments, one from a standards perspective, the other from practical/safety perspective. ## Standards argument: When you do ```C acl = malloc(sizeof(struct posix_acl) + s

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-10-03 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/11 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eli Friedman (efriedma-quic) Changes Conditional operators that emit a branch go through a codepath which attaches metadata to that branch. But if we take a shortcut to emit a select directly, we end up skipping that code, and don

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 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 82a36468c74a29b6154639d659550c62457e655b bc7b771fce25d13c2da89f7992eda6e6ccb07242 --e

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
fmayer wrote: > > > With the function effects warnings (as errors) activated, blocking > > > functions cannot be called from non-blocking functions, and this is > > > enforced at compile time. The purpose of this series of PRs is to > > > introduce similar functionality into RealtimeSanitizer,

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/111055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang codegen] Emit !unpredictable metadata more consistently. (PR #111065)

2024-10-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/111065 >From 0d74b6ccb1b23d74f713313cd09f44aa295905c0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 3 Oct 2024 14:24:05 -0700 Subject: [PATCH] [clang codegen] Emit !unpredictable metadata more consisten

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-10-03 Thread Paul Walker via cfe-commits
@@ -953,9 +953,20 @@ Intrinsic::Intrinsic(StringRef Name, StringRef Proto, uint64_t MergeTy, SVEEmitter &Emitter, StringRef SVEGuard, StringRef SMEGuard) : Name(Name.str()), LLVMName(LLVMName), Proto(Proto.str()), - BaseTypeSp

[clang] Multilib error fixes (PR #110804)

2024-10-03 Thread Peter Smith via cfe-commits
@@ -217,15 +215,15 @@ struct MultilibSetSerialization { template <> struct llvm::yaml::MappingTraits { static void mapping(llvm::yaml::IO &io, MultilibSerialization &V) { io.mapOptional("Dir", V.Dir); -io.mapOptional("FatalError", V.FatalError); +io.mapOptional("E

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/110977 None From 36d99fc59b675737ce952087b7a71ec6e4b579a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 30 Sep 2024 16:51:35 +0200 Subject: [PATCH] [clang][analyzer] Check initializati

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110977.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp (+45-18) - (modified) clang/test/Analysis/ptr

[clang] [clang][RISC-V] fixed fp calling convention for fpcc eligible structs for risc-v (PR #110690)

2024-10-03 Thread Kamran Yousafzai via cfe-commits
https://github.com/KamranYousafzai updated https://github.com/llvm/llvm-project/pull/110690 >From 2a41d57df06316007868e9c9ffb2e247f02ddeb6 Mon Sep 17 00:00:00 2001 From: "muhammad.kamran4" Date: Tue, 1 Oct 2024 17:21:21 +0200 Subject: [PATCH] fixed fp calling convention for fpcc eligible struct

[clang] [clang][RISC-V] fixed fp calling convention for fpcc eligible structs for risc-v (PR #110690)

2024-10-03 Thread Kamran Yousafzai via cfe-commits
@@ -251,6 +251,13 @@ bool RISCVABIInfo::detectFPCCEligibleStructHelper(QualType Ty, CharUnits CurOff, // bitwidth is XLen or less. if (getContext().getTypeSize(QTy) > XLen && BitWidth <= XLen) QTy = getContext().getIntTypeForBitwidth(XLen, false); +

[clang] [clang][RISC-V] fixed fp calling convention for fpcc eligible structs for risc-v (PR #110690)

2024-10-03 Thread Kamran Yousafzai via cfe-commits
https://github.com/KamranYousafzai edited https://github.com/llvm/llvm-project/pull/110690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2024-10-03 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Closing in favour of #110023 https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2024-10-03 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space closed https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-03 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > I don't think it is correct to say that the option was ignored. It may still > be read by the compiler driver (which generates the link line). In fact it > probably _should_ be processed by the compiler driver in order to set the C++ > standard library correctly - otherwise

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/110977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
@@ -63,11 +62,39 @@ void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, "Using a fixed address is not portable because that address will " "probably not be valid in all environments or platforms."; auto R = std::make_unique(BT, Msg, N); -R->

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
@@ -63,11 +62,39 @@ void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, "Using a fixed address is not portable because that address will " "probably not be valid in all environments or platforms."; auto R = std::make_unique(BT, Msg, N); -R->

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/110977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
@@ -23,38 +25,35 @@ using namespace ento; namespace { class FixedAddressChecker - : public Checker< check::PreStmt > { +: public Checker, check::PreStmt, + check::PreStmt> { const BugType BT{this, "Use fixed address"}; + void checkUseOfFixedAddre

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
@@ -63,11 +62,39 @@ void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, "Using a fixed address is not portable because that address will " "probably not be valid in all environments or platforms."; auto R = std::make_unique(BT, Msg, N); -R->

[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-03 Thread Balazs Benics via cfe-commits
@@ -63,11 +62,39 @@ void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, "Using a fixed address is not portable because that address will " "probably not be valid in all environments or platforms."; auto R = std::make_unique(BT, Msg, N); -R->

[clang] [llvm] [AArch64]Fix FEAT_SME_LUTv2 to have FEAT_SME2 implemented. (PR #110474)

2024-10-03 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/110474 >From 3dba9029635f8073cae0c6cd6b3d5e97271150ab Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 23 Sep 2024 16:35:20 + Subject: [PATCH 1/2] [AArch64]Fix FEAT_SME_LUTv2 to have FEAT_SME2

[clang] a017ed0 - [analyzer] Model overflow builtins (#102602)

2024-10-03 Thread via cfe-commits
Author: Pavel Skripkin Date: 2024-10-03T12:27:25+02:00 New Revision: a017ed04cc9bcc75b3c3ef35c923dbe7dc4606f8 URL: https://github.com/llvm/llvm-project/commit/a017ed04cc9bcc75b3c3ef35c923dbe7dc4606f8 DIFF: https://github.com/llvm/llvm-project/commit/a017ed04cc9bcc75b3c3ef35c923dbe7dc4606f8.diff

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-03 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 200dd6f - [clang][x86] Update SSE1/2/3 intrinsic tests for both C/C++

2024-10-03 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-10-03T11:31:39+01:00 New Revision: 200dd6fb1764389cd57dc09575c7883d8fb02764 URL: https://github.com/llvm/llvm-project/commit/200dd6fb1764389cd57dc09575c7883d8fb02764 DIFF: https://github.com/llvm/llvm-project/commit/200dd6fb1764389cd57dc09575c7883d8fb02764.diff

[clang] 1ba19d6 - [clang][x86] Update SSE4A intrinsic tests for both C/C++

2024-10-03 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-10-03T11:31:39+01:00 New Revision: 1ba19d6c49663a35baf5d6cdc4a149e2aca9ae6c URL: https://github.com/llvm/llvm-project/commit/1ba19d6c49663a35baf5d6cdc4a149e2aca9ae6c DIFF: https://github.com/llvm/llvm-project/commit/1ba19d6c49663a35baf5d6cdc4a149e2aca9ae6c.diff

[clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

2024-10-03 Thread Paul Osmialowski via cfe-commits
@@ -0,0 +1,48 @@ +// REQUIRES: system-linux pawosm-arm wrote: As I stated in my other comment, the `-###` output is not affected by the `-stdlib=` flag, so a test which looks at its output would not provide a great value. The integration test from the other han

[clang] [llvm] [AArch64]Fix FEAT_SME_LUTv2 to have FEAT_SME2 implemented. (PR #110474)

2024-10-03 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/110474 >From 3dba9029635f8073cae0c6cd6b3d5e97271150ab Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Mon, 23 Sep 2024 16:35:20 + Subject: [PATCH 1/3] [AArch64]Fix FEAT_SME_LUTv2 to have FEAT_SME2

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/6049 Here is the relevant p

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/4864 Here is the relevant piece of the build log

<    1   2   3   4   5   >