[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-19 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/120443 >From 35989b3a5b78f1eacc13104d9fdb806eb92ac7ae Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 18 Dec 2024 13:17:13 + Subject: [PATCH 1/3] Add test to show missing CSE. --- .../post-vectorisat

[clang] [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (PR #120549)

2024-12-19 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/120549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-19 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 3146911eb0eee821535444aa207a4ec5020c9c6a 1d42e0f61b43d7571e1a8bf52a245754a27f48b1 --e

[clang] [Clang][AArch64] Remove const from base pointers in sve2p1 stores (PR #120551)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SpencerAbson) Changes This patch removes the const qualifier from the base pointer argument of `svst1wq`/`svst1wq_vnum` and `svst1dq`/`svst1dq_vnum`, in accordance with https://github.com/ARM-software/acle/pull/359. --- Full diff:

[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-19 Thread Paul Walker via cfe-commits
@@ -1306,6 +1306,10 @@ void PassBuilder::addVectorPasses(OptimizationLevel Level, } // Cleanup after the loop optimization passes. FPM.addPass(InstCombinePass()); + // InstCombine can create CSE opportunities when it cleans the result of loop + // vectorization. They o

[clang] [Clang][AArch64] Remove const from base pointers in sve2p1 stores (PR #120551)

2024-12-19 Thread via cfe-commits
https://github.com/SpencerAbson created https://github.com/llvm/llvm-project/pull/120551 This patch removes the const qualifier from the base pointer argument of `svst1wq`/`svst1wq_vnum` and `svst1dq`/`svst1dq_vnum`, in accordance with https://github.com/ARM-software/acle/pull/359. >From c369

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/116462 >From daddb9e13db6ca8373dc7298d17aa36a03014aeb Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Fri, 15 Nov 2024 07:37:17 -0500 Subject: [PATCH 01/13] [analy

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/116462 >From daddb9e13db6ca8373dc7298d17aa36a03014aeb Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Fri, 15 Nov 2024 07:37:17 -0500 Subject: [PATCH 01/12] [analy

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes Fixes: #103499 --- Full diff: https://github.com/llvm/llvm-project/pull/120547.diff 4 Files Affected: - (modified) clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp (+16) - (modified) c

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/120435 >From 587368ab2930dc9f62eae12edec3e47f68d38135 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 18 Dec 2024 15:53:32 +0100 Subject: [PATCH 1/2] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APS

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-19 Thread Benjamin Maxwell via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [SYCL] Allow neon attributes for ARM host (PR #94229)

2024-12-19 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk updated https://github.com/llvm/llvm-project/pull/94229 >From 481f6c53379abb4b7240f25b55fb90b54b9454c1 Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Mon, 3 Jun 2024 15:03:17 +0100 Subject: [PATCH] [SYCL] Allow neon attributes for ARM host We permit neon attribu

[clang] [SYCL] Allow neon attributes for ARM host (PR #94229)

2024-12-19 Thread Harald van Dijk via cfe-commits
hvdijk wrote: Rebased to address a conflict with changes that have gone in since I first submitted this, the PR remains otherwise identical and waiting to be reviewed. https://github.com/llvm/llvm-project/pull/94229 ___ cfe-commits mailing list cfe-co

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-19 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/119896 >From dd1f6807904691586c715d447fff54915a46c751 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 3 Dec 2024 22:32:46 + Subject: [PATCH 1/7] [clang][cmake] Apply bolt optimizations as part of the clang

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-19 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/119896 >From dd1f6807904691586c715d447fff54915a46c751 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 3 Dec 2024 22:32:46 + Subject: [PATCH 1/6] [clang][cmake] Apply bolt optimizations as part of the clang

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/120538 Remove item 2 from #120370 to avoid breaking libc++ tests. This reverts commit 60a2f32cf5ce75c9a2511d7fc2b0f24699605912. >From 17fe10b69951dc9f2cbeb0e4547515a6191cba2c Mon Sep 17 00:00:00 2001 From: Vitaly

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/120538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-19 Thread Petr Hosek via cfe-commits
@@ -134,3 +147,42 @@ if(CLANG_ORDER_FILE AND set_target_properties(clang PROPERTIES LINK_DEPENDS ${CLANG_ORDER_FILE}) endif() endif() + +if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED) + # Add a clang-bolt target for backwards compatibility. + add_custom_target(clang-bo

[clang] [diagtool] Make the BuiltinDiagnosticsByID table sorted (PR #120321)

2024-12-19 Thread Björn Pettersson via cfe-commits
bjope wrote: Added some reviewers based on people that have touched code related to "diagnostics" (but don't really know much about the fix, nor who might know anything about this particular code in diagtool). Feel free to redirect to someone else (or let me know if I should try to find other

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-19 Thread Petr Hosek via cfe-commits
@@ -558,7 +560,107 @@ def genOrderFile(args): return 0 +def bolt_optimize(args): +parser = argparse.ArgumentParser("%prog [options] ") +parser.add_argument("--method") +parser.add_argument("--input") +parser.add_argument("--instrumented-output") +pars

[clang] beea5ac - Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (#120538)

2024-12-19 Thread via cfe-commits
Author: Vitaly Buka Date: 2024-12-19T01:07:54-08:00 New Revision: beea5acc5e7d17a29e48f5dc627019e4db510e23 URL: https://github.com/llvm/llvm-project/commit/beea5acc5e7d17a29e48f5dc627019e4db510e23 DIFF: https://github.com/llvm/llvm-project/commit/beea5acc5e7d17a29e48f5dc627019e4db510e23.diff L

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/120538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Vitaly Buka (vitalybuka) Changes Reland without item 2 from #120370 to avoid breaking libc++ tests. This reverts commit 60a2f32cf5ce75c9a2511d7fc2b0f24699605912. --- Full diff: https://github.com/llvm/llvm-project/pull/120538.diff

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #120449)

2024-12-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/120449 >From 28174b0b54d36b070200d630bdeae64232264841 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 18 Dec 2024 15:46:02 + Subject: [PATCH 1/5] Add test for current behaviour --- clang/test/CodeGen/

[clang] 9fc2fad - [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (#120449)

2024-12-19 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-12-19T09:12:19Z New Revision: 9fc2fadbfcb34df5f72bdaed28a7874bf584eed7 URL: https://github.com/llvm/llvm-project/commit/9fc2fadbfcb34df5f72bdaed28a7874bf584eed7 DIFF: https://github.com/llvm/llvm-project/commit/9fc2fadbfcb34df5f72bdaed28a7874bf584eed7.diff LO

[clang] [Clang] Re-write codegen for atomic_test_and_set and atomic_clear (PR #120449)

2024-12-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/120449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -1592,6 +1605,13 @@ struct CounterCoverageMappingBuilder llvm::EnableSingleByteCoverage ? getRegionCounter(S->getCond()) : addCounters(ParentCount, BackedgeCount, BC.ContinueCount); +auto [ExecCount, ExitCount] = +(llvm::EnableSing

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -2221,27 +2249,27 @@ struct CounterCoverageMappingBuilder extendRegion(E->getRHS()); propagateCounts(getRegionCounter(E), E->getRHS()); +if (llvm::EnableSingleByteCoverage) chapuni wrote: This is a small refactor for below and this itself will

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -941,6 +941,19 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + std::pair getBranchCounterPair(const Stmt *S, + Counter ParentCnt) { +Counter ExecCnt = getRegionCounter(S); +

[clang] [clang-format] Fix crashes when the macro expansion is empty (PR #119428)

2024-12-19 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119428 From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 02:13:43 +0800 Subject: [PATCH 1/4] Fix crashes when the macro expansion is empty --- clang/lib/F

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Alex Voicu via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -0,0 +1,30 @@ +// Test AArch64 build attributes to assmebly: 'aeabi_feature_and_bits' ostannard wrote: These clang tests should be removed. https://github.com/llvm/llvm-project/pull/118771 ___ cfe-commits mailing li

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard edited https://github.com/llvm/llvm-project/pull/118771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard commented: It looks like this is still missing the ability to emit build attributes by number, for future attributes the assembler does not know about. There is also still a lot of new code here not covered by tests: * Tests for pauthabi platform/version in codegen

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -793,20 +793,23 @@ void ARMTargetELFStreamer::switchVendor(StringRef Vendor) { void ARMTargetELFStreamer::emitAttribute(unsigned Attribute, unsigned Value) { getStreamer().setAttributeItem(Attribute, Value, - /* OverwriteExisting= */ true)

[clang-tools-extra] ecdc528 - [Clang] Fix crash in __builtin_assume_aligned (#114217)

2024-12-19 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-12-19T10:34:56Z New Revision: ecdc5289afec1af98640b6375a52aaf448fe7388 URL: https://github.com/llvm/llvm-project/commit/ecdc5289afec1af98640b6375a52aaf448fe7388 DIFF: https://github.com/llvm/llvm-project/commit/ecdc5289afec1af98640b6375a52aaf448fe7388.diff LO

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -19,9 +19,74 @@ #define LLVM_SUPPORT_ARMBUILDATTRIBUTES_H #include "llvm/Support/ELFAttributes.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/TableGen/Record.h" namespace llvm { +class StringRef; + namespace ARMBuildAttrs { +// AArch64 build attributes --

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -148,13 +151,133 @@ class AArch64TargetAsmStreamer : public AArch64TargetStreamer { OS << "\t.seh_save_any_reg_px\tq" << Reg << ", " << Offset << "\n"; } + void emitAttribute(unsigned VendorID, unsigned Tag, unsigned Value, + bool Override) overr

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -151,3 +151,81 @@ llvm::createAArch64ObjectTargetStreamer(MCStreamer &S, MCTargetStreamer *llvm::createAArch64NullTargetStreamer(MCStreamer &S) { return new AArch64TargetStreamer(S); } + +void AArch64TargetStreamer::emitSubsection( ostannard wrote: The te

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -783,6 +786,67 @@ void MCELFStreamer::createAttributesSection( AttrsVec.clear(); } +void MCELFStreamer::createAArch64AttributesSection( ostannard wrote: If this is AArch64 specific, it should be moved to one of the AArch64 classes, probably `AArch64Targ

[clang] [clang-tools-extra] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-19 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/114217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-19 Thread Oliver Stannard via cfe-commits
@@ -105,27 +107,55 @@ class MCELFStreamer : public MCObjectStreamer { unsigned Tag; unsigned IntValue; std::string StringValue; +AttributeItem(Types Ty, unsigned Tg, unsigned IV, std::string SV) +: Type(Ty), Tag(Tg), IntValue(IV), StringValue(SV) {} + }

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for doing this NFC code fortification, I appreciate the effort! I quickly read through all comments in this stack, and I approve their goals and high-level structure. I'm not (yet) giving a formal approval only because I didn't dig into the small

[clang] [clang-tools-extra] [clangd] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-19 Thread Richard Li via cfe-commits
https://github.com/chomosuke edited https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TySan] Don't report globals with external storage. (PR #120565)

2024-12-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/120565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Erich Keane via cfe-commits
@@ -129,4 +130,224 @@ def PrimitiveInt : AnyTypeOf<[UInt8, UInt16, UInt32, UInt64, SInt8, SInt16, SInt32, SInt64], "primitive int", "::cir::IntType">; +//===--===// +// FloatType +//===

[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)

2024-12-19 Thread Peng Huang via cfe-commits
phuang wrote: @MaskRay friendly ping. thanks. https://github.com/llvm/llvm-project/pull/120159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Erich Keane via cfe-commits
@@ -0,0 +1,52 @@ +//===- CIRFPTypeInterface.td - CIR FP Interface Definitions -*- C++ -*-===// erichkeane wrote: Yep, makes sense to me. https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing lis

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Erich Keane via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] 9469fd2 - [Clang][AArch64] Remove const from base pointers in sve2p1 stores (#120551)

2024-12-19 Thread via cfe-commits
Author: SpencerAbson Date: 2024-12-19T14:13:02Z New Revision: 9469fd24b9a377947ed7726aee671a6095d44e44 URL: https://github.com/llvm/llvm-project/commit/9469fd24b9a377947ed7726aee671a6095d44e44 DIFF: https://github.com/llvm/llvm-project/commit/9469fd24b9a377947ed7726aee671a6095d44e44.diff LOG:

[clang] [Clang][AArch64] Remove const from base pointers in sve2p1 stores (PR #120551)

2024-12-19 Thread via cfe-commits
https://github.com/SpencerAbson closed https://github.com/llvm/llvm-project/pull/120551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: With my change reverted I get the failure as well: ``` FAIL: SanitizerCommon-msan-x86_64-Linux :: Linux/dn_expand.cpp (5088 of 5094) TEST 'SanitizerCommon-msan-x86_64-Linux :: Linux/dn_expand.cpp' FAILED Exit Code: 1 Command Output (

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: With my change reverted, the test lives in `compiler-rt/test/sanitizer_common`, where we get an additional `--sysroot=` argument. This comes from `compiler-rt/test/sanitizer_common/lit.site.cfg.py.in`: ```python # Tool-specific config options. config.name_suffix = "@CONFIG_N

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-19 Thread Florian Mayer via cfe-commits
fmayer wrote: I was working on this miscompile. I cannot give a reproducer right now, but the following observations: The generated IR is clearly incorrect (the `inbounds nuw`), of the form: ``` %x = alloca [12 x i32], align 16 [...] %59 = getelementptr inbounds nuw i8, ptr %x, i64 -4 %wide.ma

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120547 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH 1/2] [clang-tidy] support parameters file in command line Fix

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-12-19 Thread kleines Filmröllchen via cfe-commits
kleinesfilmroellchen wrote: I don't have any energy and the massive reachitecting requested would take me tons of time. Please adopt this. Serenity folks are also waiting fwiw https://github.com/llvm/llvm-project/pull/67749 ___ cfe-commits mailing lis

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120547 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH 1/2] [clang-tidy] support parameters file in command line Fix

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM with some minor nits https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -63,13 +153,71 @@ mlir::Type CIRGenTypes::convertType(QualType type) { cir::IntType::get(&getMLIRContext(), astContext.getTypeSize(ty), /*isSigned=*/false); break; + +// Floating-point types +case BuiltinType::Float16: +

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/120484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -133,6 +143,276 @@ IntType::verify(llvm::function_ref emitError, return mlir::success(); } +//===--===// +// Floating-point type definitions +//===

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-19 Thread Justin Bogner via cfe-commits
bogner wrote: > Two questions: > > 1. Do we foresee any issue adding `afn` (I suspect not) Adding `afn` should be fine - we don't have library functions per se anyway so this shouldn't make any difference one way or the other. > 2. Do we also need to apply `contract`, which I believe was also

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: @keryell > How to up-stream some changes which are cross-project like > https://github.com/llvm/clangir/pull/1203 which introduces a new MLIR > parser/pretty-printer feature like: My bad here, we usually don't accept such changes and I missed that during review time. Cl

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-19 Thread Justin Bogner via cfe-commits
bogner wrote: Note: To see the bitcode writer crash, apply this patch and set up https://github.com/llvm-beanz/HLSLTest - Basic/simple.test hits an assert: ``` Assertion failed: ((Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!"), function Emit, file BitstreamWriter.h, line 284. ... #7 0

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/116462 >From daddb9e13db6ca8373dc7298d17aa36a03014aeb Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Fri, 15 Nov 2024 07:37:17 -0500 Subject: [PATCH 01/14] [analy

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-19 Thread Benjamin Maxwell via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-19 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/114086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] db84ae3 - [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (#120549)

2024-12-19 Thread via cfe-commits
Author: SpencerAbson Date: 2024-12-19T13:27:07Z New Revision: db84ae3a68173fc561acb79adb6c557cb73ad938 URL: https://github.com/llvm/llvm-project/commit/db84ae3a68173fc561acb79adb6c557cb73ad938 DIFF: https://github.com/llvm/llvm-project/commit/db84ae3a68173fc561acb79adb6c557cb73ad938.diff LOG:

[clang] [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (PR #120549)

2024-12-19 Thread via cfe-commits
https://github.com/SpencerAbson closed https://github.com/llvm/llvm-project/pull/120549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. For me it looks good. https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
steakhal wrote: @vinay-deshmukh WDYT of the current shape? Can we merge it? https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
https://github.com/zsrkmyn updated https://github.com/llvm/llvm-project/pull/120352 >From 3351cf82f3fef3bf22cd274e16c3e23133cd7754 Mon Sep 17 00:00:00 2001 From: Senran Zhang Date: Tue, 17 Dec 2024 16:15:25 +0800 Subject: [PATCH] [ConstantRange] Estimate tighter lower (upper) bounds for masked

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Balazs Benics via cfe-commits
steakhal wrote: ### Merge activity * **Dec 19, 6:02 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/120435). https://github.com/llvm/llvm-project/pull/120435 ___

[clang] [OpenMP] Codegen support for masked combined construct (PR #120520)

2024-12-19 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/120520 >From ca5e6f208927fc9b82c6dce34ee46dbca2d83a58 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Wed, 18 Dec 2024 22:36:19 -0600 Subject: [PATCH 1/3] Codegen support for masked combined construct --- cla

[clang] [libclang/python] Add python binding for clang_Cursor_isAnonymousRecordDecl (PR #120483)

2024-12-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. You should add a release note and a PR description. LGTM otherwise. https://github.com/llvm/llvm-project/pull/120483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/120435 >From 587368ab2930dc9f62eae12edec3e47f68d38135 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 18 Dec 2024 15:53:32 +0100 Subject: [PATCH] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt

[clang] [TySan] Don't report globals with external storage. (PR #120565)

2024-12-19 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/120565 Globals with external storage should have been initialized where they are defined. Fixes https://github.com/llvm/llvm-project/issues/120448 >From a12283a7da8da16053f02ecf4f41c2eaa06717cd Mon Sep 17 00:00:00 2001

[clang] [TySan] Don't report globals with external storage. (PR #120565)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Hahn (fhahn) Changes Globals with external storage should have been initialized where they are defined. Fixes https://github.com/llvm/llvm-project/issues/120448 --- Full diff: https://github.com/llvm/llvm-project/pull/120565.diff

[clang] [TySan] Don't report globals with external storage. (PR #120565)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Florian Hahn (fhahn) Changes Globals with external storage should have been initialized where they are defined. Fixes https://github.com/llvm/llvm-project/issues/120448 --- Full diff: https://github.com/llvm/llvm-project/pull/120

[clang] [TySan] Don't report globals with external storage. (PR #120565)

2024-12-19 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 cffe22a93726a64e6a205b5dcd1c306a62488412 a12283a7da8da16053f02ecf4f41c2eaa06717cd --e

[clang] [clang][bytecode] Support pointers in __builtin_mem{move, cpy} (PR #120560)

2024-12-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120560 Unfortunately, that means we can't use the __builtin_bit_cast implementation for this. >From 1fe4940ad01bae6ab75cdf8bd1ea9812929e716d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 19

[clang] d0d5101 - [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (2/4) (#120436)

2024-12-19 Thread via cfe-commits
Author: Balazs Benics Date: 2024-12-19T12:51:40+01:00 New Revision: d0d5101f9959013e42f6f07d79d0fe638aaa0aa3 URL: https://github.com/llvm/llvm-project/commit/d0d5101f9959013e42f6f07d79d0fe638aaa0aa3 DIFF: https://github.com/llvm/llvm-project/commit/d0d5101f9959013e42f6f07d79d0fe638aaa0aa3.diff

[clang] [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4) (PR #120437)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/120437 >From c7e3bc0c65c588357dbcee173fa39be9bf2db19d Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 18 Dec 2024 15:57:26 +0100 Subject: [PATCH] [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4

[clang] [clang][bytecode] Support pointers in __builtin_mem{move, cpy} (PR #120560)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Unfortunately, that means we can't use the __builtin_bit_cast implementation for this. --- Full diff: https://github.com/llvm/llvm-project/pull/120560.diff 5 Files Affected: - (modified) clang/lib/AST/Byt

[clang] [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (2/4) (PR #120436)

2024-12-19 Thread Balazs Benics via cfe-commits
steakhal wrote: ### Merge activity * **Dec 19, 6:49 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/120436). https://github.com/llvm/llvm-project/pull/120436 ___

[clang] [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (2/4) (PR #120436)

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

[clang] [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4) (PR #120437)

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

[clang] [analyzer][NFC] Migrate {SymInt, IntSym}Expr to use APSIntPtr (4/4) (PR #120438)

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

[clang] 13e20bc - [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4) (#120437)

2024-12-19 Thread via cfe-commits
Author: Balazs Benics Date: 2024-12-19T12:57:51+01:00 New Revision: 13e20bcb98e57831d46162b9ba42a78d85e8283d URL: https://github.com/llvm/llvm-project/commit/13e20bcb98e57831d46162b9ba42a78d85e8283d DIFF: https://github.com/llvm/llvm-project/commit/13e20bcb98e57831d46162b9ba42a78d85e8283d.diff

[clang] [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4) (PR #120437)

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

[clang] [analyzer][NFC] Migrate loc::ConcreteInt to use APSIntPtr (3/4) (PR #120437)

2024-12-19 Thread Balazs Benics via cfe-commits
steakhal wrote: ### Merge activity * **Dec 19, 6:57 AM EST**: A user merged this pull request with [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/120437). https://github.com/llvm/llvm-project/pull/120437 ___ cfe-commits mailing list

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
@@ -245,6 +247,41 @@ SPIRVTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, return DefaultGlobalAS; } +void SPIRVTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { + if (!M.getLangOpts().HIP |

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/116820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-19 Thread Piotr Zegar via cfe-commits
@@ -259,100 +259,118 @@ ImplicitBoolConversionCheck::ImplicitBoolConversionCheck( AllowIntegerConditions(Options.get("AllowIntegerConditions", false)), AllowPointerConditions(Options.get("AllowPointerConditions", false)), UseUpperCaseLiteralSuffix( -

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except pointed out findings, looks ok. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

<    1   2   3   4   5   6   >