[clang] MIPS/Clang: Use FP32 by default if CPU is mips1 (PR #92122)

2024-05-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/92122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 073488c - MIPS/Clang: Use FP32 by default if CPU is mips1 (#92122)

2024-05-19 Thread via cfe-commits
Author: YunQiang Su Date: 2024-05-20T14:50:26+08:00 New Revision: 073488cb1f2ca131253efa3171bd56be34ba9fb3 URL: https://github.com/llvm/llvm-project/commit/073488cb1f2ca131253efa3171bd56be34ba9fb3 DIFF: https://github.com/llvm/llvm-project/commit/073488cb1f2ca131253efa3171bd56be34ba9fb3.diff L

[clang] MIPS/Clang: Add more false option pairs into validateTarget (PR #91968)

2024-05-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/91968 >From cccd9606fd574726c2cde2e473d1e05a62147caf Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Mon, 13 May 2024 21:46:40 +0800 Subject: [PATCH] MIPS/Clang: Add more false option pairs into validateTarget The op

[clang] Clang/MIPS: Add +fp64 if MSA and no explicit -mfp option (PR #91949)

2024-05-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/91949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d59bc6b - Clang/MIPS: Add +fp64 if MSA and no explicit -mfp option (#91949)

2024-05-19 Thread via cfe-commits
Author: YunQiang Su Date: 2024-05-20T14:48:34+08:00 New Revision: d59bc6b5c75384aa0b1e78cc85e17e8acaccebaf URL: https://github.com/llvm/llvm-project/commit/d59bc6b5c75384aa0b1e78cc85e17e8acaccebaf DIFF: https://github.com/llvm/llvm-project/commit/d59bc6b5c75384aa0b1e78cc85e17e8acaccebaf.diff L

[clang] [llvm] [RISCV] Bump Zaamo and Zalrsc to version 1.0 (PR #91556)

2024-05-19 Thread Pengcheng Wang via cfe-commits
@@ -112,10 +112,10 @@ ; RUN: llc -mtriple=riscv32 -mattr=+experimental-zfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZFBFMIN %s ; RUN: llc -mtriple=riscv32 -mattr=+experimental-zvfbfmin %s -o - | FileCheck --check-prefixes=CHECK,RV32ZVFBFMIN %s ; RUN: llc -mtriple=ri

[clang] [llvm] [RISCV] Bump Zaamo and Zalrsc to version 1.0 (PR #91556)

2024-05-19 Thread Pengcheng Wang via cfe-commits
@@ -1554,13 +1554,13 @@ // CHECK-ZVKT-EXT: __riscv_zvkt 100{{$}} // Experimental extensions -// RUN: %clang --target=riscv32 -menable-experimental-extensions \ -// RUN: -march=rv32i_zaamo0p2 -E -dM %s \ +// RUN: %clang --target=riscv32 \ wangpc-pp wrote:

[clang] [llvm] [RISCV] Bump Zaamo and Zalrsc to version 1.0 (PR #91556)

2024-05-19 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/91556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9500a5d - [MC] Make UseAssemblerInfoForParsing mostly true

2024-05-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-19T23:35:15-07:00 New Revision: 9500a5d02e23f9b43294e5f662ac099f8989c0e4 URL: https://github.com/llvm/llvm-project/commit/9500a5d02e23f9b43294e5f662ac099f8989c0e4 DIFF: https://github.com/llvm/llvm-project/commit/9500a5d02e23f9b43294e5f662ac099f8989c0e4.diff

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: Removing `getUseAssemblerInfoForParsing` would make MCDwarfFrameEmitter::Emit (for .eh_frame FDE) slow (~4% compile time regression for sqlite3.c amalgamation) due to expensive `AttemptToFoldSymbolOffsetDifference`. For now, make `UseAssemblerInfoForParsing` false in MCDwarfFram

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-19 Thread Vassil Vassilev via cfe-commits
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) { // Remove this name from our lexical scope, and warn on it if we haven't // already. -IdResolver.RemoveDecl(D); +if (!PP.isIncrementalProcessingEnabled()) + IdResolver.RemoveDec

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

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

[clang] [clang] Use SmallString::str (NFC) (PR #92717)

2024-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92717.diff 3 Files Affected: - (modified) clang/lib/ARCMigrate/ARCMT.cpp (+1-2) - (modified) clang/lib/ARCMigrate/ObjCMT.cpp (+1-2) - (modi

[clang] [clang] Use SmallString::str (NFC) (PR #92717)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/92717 None >From 46dc6749639faa9734028a61376d05bb38ebebad Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 May 2024 22:50:49 -0700 Subject: [PATCH] [clang] Use SmallString::str (NFC) --- clang/lib/ARC

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-19 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the IdR

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-19 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit &PTU) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the IdR

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Chris Apple via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apach

[clang] d316a0b - [NFC] Remove unused ASTWriter::getTypeID

2024-05-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-05-20T13:36:46+08:00 New Revision: d316a0bd48ceb4a0ee851d729291a2cdcc8818eb URL: https://github.com/llvm/llvm-project/commit/d316a0bd48ceb4a0ee851d729291a2cdcc8818eb DIFF: https://github.com/llvm/llvm-project/commit/d316a0bd48ceb4a0ee851d729291a2cdcc8818eb.diff LO

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-19 Thread NAKAMURA Takumi via cfe-commits
@@ -2064,7 +2082,20 @@ struct CounterCoverageMappingBuilder createDecisionRegion(E, DecisionParams); } + /// Check if E belongs to system headers. + bool isExprInSystemHeader(const BinaryOperator *E) const { chapuni wrote: I assume each visitor (`visi

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: I think it's a good rewrite. Added more RISCV guys. https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Chris Apple via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = "RADSAN" + config.name_suffix + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) cjappl wrote: Yes, the lit tests may be placed directly in `compiler-

[clang] [clang] add unnamed_addr function attribute (PR #92499)

2024-05-19 Thread YAMAMOTO Takashi via cfe-commits
@@ -1944,6 +1944,13 @@ def ReturnsTwice : InheritableAttr { let SimpleHandler = 1; } +def UnnamedAddr : InheritableAttr { + let Spellings = [Clang<"unnamed_addr">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [Undocumented]; yamt wrote

[clang] [clang] add unnamed_addr function attribute (PR #92499)

2024-05-19 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/92499 >From 52b744c91bdba1cf8cda9d6164ec8fc130d75fab Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 17 May 2024 14:47:06 +0900 Subject: [PATCH 1/3] [clang] add unnamed_addr function attribute It simply applies

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > While I am not against the idea about splitting Sema, the implementation > detail makes me slightly concerning. What I had in mind is to split SemaC, > SemaCXX (this can be derived class of SemaCXX), SemaObjC and other dialects > (e.g., ACC or CUDA) out of Sema. Inheritance i

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It is, but I guess significant enough to not be disguised by labeling as NFC. https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-19 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/92644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-19 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Is it a NFC? https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3622,15 +3623,15 @@ def Fma : FPMathTemplate, LibBuiltin<"math.h"> { def Fmax : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["fmax"]; - let Attributes = [NoThrow, Const]; + let Attributes = [NoThrow, Const, Constexpr]; hubert-reinterpretcast

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3622,15 +3623,15 @@ def Fma : FPMathTemplate, LibBuiltin<"math.h"> { def Fmax : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["fmax"]; - let Attributes = [NoThrow, Const]; + let Attributes = [NoThrow, Const, Constexpr]; let Prototype = "T(T, T)"; let Ad

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -190,6 +190,16 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(&MCDCParams); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (Br

[clang] [Coverage] Rework !SystemHeadersCoverage (PR #91446)

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -2064,7 +2082,20 @@ struct CounterCoverageMappingBuilder createDecisionRegion(E, DecisionParams); } + /// Check if E belongs to system headers. + bool isExprInSystemHeader(const BinaryOperator *E) const { ornata wrote: assert E is not nullptr? htt

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -517,7 +552,7 @@ class CoverageMappingBuilder { SourceRegionFilter Filter; for (const auto &FM : FileIDMapping) { SourceLocation ExpandedLoc = FM.second.second; - SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc); + SourceLocation Paren

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-19 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. https://github.com/llvm/llvm-project/pull/92644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- + +import os + +# Setup config name. +config.name = "RADSAN" + config.name_suffix + +# Setup source root. +config.test_source_root = os.path.dirname(__file__) MaskRay wrote: `msan`, `lsan`, `gwp_asan` places lit tests directly u

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,413 @@ +//===--- radsan_interceptors.cpp - Realtime Sanitizer --*- C++ +//-*-===// +// +// 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-Identifie

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,38 @@ +//===--- radsan_context.h - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apache-2

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apache-2

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,106 @@ +//===--- radsan_context.cpp - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apach

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,50 @@ +//===--- radsan.h - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apache-2.0 WITH

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,52 @@ +//===--- radsan_stack.cpp - Realtime Sanitizer --*- C++ -*-===// +// +// 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: Apache-2

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,71 @@ +# -*- Python -*- MaskRay wrote: Delete Some older `lit.cfg.py` files might use this because previously they were named `lit.cfg` https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits maili

[clang] [clang][driver] add pointer qualifier to auto type (PR #91874)

2024-05-19 Thread Mohammed Keyvanzadeh via cfe-commits
VoltrexKeyva wrote: Pinging are there haven't been any reviews in a week. https://github.com/llvm/llvm-project/pull/91874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-19 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Merge the two tests into one and put it under apx directory. https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -14683,6 +14710,23 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexp: + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexpl: { hubert-reinterpretcast wrote: `_

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { hubert-reinterpretcast wrote: There is a separate `FrexpF16F128` that should probably also be updated. https://github.com/llvm/llvm-pro

[clang] [Serialization] Read the initializer for interesting static variables before consuming it (PR #92353)

2024-05-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/92353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fc0144a - [Serialization] Read the initializer for interesting static variables before consuming it (#92353)

2024-05-19 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-05-20T10:36:03+08:00 New Revision: fc0144a30cf20d6405411da141d11bfde143d3d2 URL: https://github.com/llvm/llvm-project/commit/fc0144a30cf20d6405411da141d11bfde143d3d2 DIFF: https://github.com/llvm/llvm-project/commit/fc0144a30cf20d6405411da141d11bfde143d3d2.diff LO

[clang] [serialization] no transitive decl change (PR #92083)

2024-05-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @jansvoboda11 @Bigcheese gentle ping https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: While I am not against the idea about splitting Sema, the implementation detail makes me slightly concerning. What I had in mind is to split `SemaC`, `SemaCXX` (this can be derived class of `SemaCXX`), `SemaObjC` and other dialects (e.g., ACC or CUDA) out of `Sema`. Then big

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce RADSan backend (PR #92460)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args, StaticRuntimes.push_back("asan_cxx"); } + if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) { +StaticRuntimes.push_back("radsan"); + } MaskRay wrote

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-19 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: ping for review https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d102ee6 - [clang] Use operator==(StringRef, StringRef) (NFC) (#92708)

2024-05-19 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-05-19T16:51:07-07:00 New Revision: d102ee63e849cdaa586fd1aaae900c1399bf2b76 URL: https://github.com/llvm/llvm-project/commit/d102ee63e849cdaa586fd1aaae900c1399bf2b76 DIFF: https://github.com/llvm/llvm-project/commit/d102ee63e849cdaa586fd1aaae900c1399bf2b76.diff L

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
@@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { -if (B->compare(".") == 0) { -} -else if (B->compare("..") == 0) +if

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/92708 >From cf3992f72b340cd402709c24bb8363a2f896635e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 May 2024 09:22:14 -0700 Subject: [PATCH 1/2] [clang] Use operator==(StringRef, StringRef) (NFC) ---

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM with a nit https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -435,9 +435,8 @@ static std::string replaceDotDot(StringRef Path) { llvm::sys::path::const_iterator B = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); while (B != E) { -if (B->compare(".") == 0) { -} -else if (B->compare("..") == 0) +if

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["frexp"]; - let Attributes = [NoThrow]; + let Attributes = [NoThrow, Constexpr]; hubert-reinterpretcast wrote: > I

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92708.diff 3 Files Affected: - (modified) clang-tools-extra/modularize/ModularizeUtilities.cpp (+2-3) - (m

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/92708 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Use operator==(StringRef, StringRef) (NFC) (PR #92708)

2024-05-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/92708 StringRef) (NFC), >From cf3992f72b340cd402709c24bb8363a2f896635e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 May 2024 09:22:14 -0700 Subject: [PATCH] [clang] Use operator==(StringRef, String

[clang] 2d5e488 - [clang-format][NFC] Clean up SortIncludesTest.cpp

2024-05-19 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-05-19T15:19:05-07:00 New Revision: 2d5e488c98225108aebfe4aa4acfe6ec1f234a37 URL: https://github.com/llvm/llvm-project/commit/2d5e488c98225108aebfe4aa4acfe6ec1f234a37 DIFF: https://github.com/llvm/llvm-project/commit/2d5e488c98225108aebfe4aa4acfe6ec1f234a37.diff LOG:

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -emit-llvm -triple i386-linux -Wno-unknown-pragmas %s -o - | FileCheck %s efriedma-quic wrote: Since this is a preprocessor testcase, can you just use -E? https://github.com/llvm/llvm-project/pull/92699 _

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-19 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-19 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-19 Thread Matthew Olsson via cfe-commits
https://github.com/mattco98 converted_to_draft https://github.com/llvm/llvm-project/pull/92673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-19 Thread Matthew Olsson via cfe-commits
mattco98 wrote: @nico pointed out that calling `handleAttributes()` in `tryToParseLambda()` might be a better way to fix this, and I might be able to fix his other attribute issue while I'm at it. Going to draft this for now. https://github.com/llvm/llvm-project/pull/92673

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-19 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-05-19 Thread Andreas Jonson via cfe-commits
andjo403 wrote: hmm noticed #91101 now looks like I need to coordinate with that PR https://github.com/llvm/llvm-project/pull/92666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/3] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,100 @@ +# RUN: llvm-mc -filetype=obj -crel -triple=x86_64 %s -o %t.o +# RUN: llvm-readelf -Sr -x .crelrodata2 -x .crelrodata16 %t.o | FileCheck %s + +# RUN: %if aarch64-registered-target %{ llvm-mc -filetype=obj -crel -triple=aarch64_be %s -o %t.be.o %} +# RUN: %if aar

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0, Addend

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -3840,14 +3849,15 @@ void GNUELFDumper::printRelRelaReloc(const Relocation &R, template static void printRelocHeaderFields(formatted_raw_ostream &OS, unsigned SType, - const typename ELFT::Ehdr &EHeader) { +

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table + --

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -32,12 +32,17 @@ FileHeader: # RUN: --match-full-lines --check-prefixes=GNU-RELOCS,GNU-PLTRELA # LLVM-RELOCS: Dynamic Relocations { +# LLVM-RELOCS-NEXT: 0x8 R_X86_64_64 foo 0x0 # LLVM-RELOCS-NEXT: 0x1 R_X86_64_NONE foo 0x0 # LLVM-RELOCS-NEXT: 0x2 R_X86_64_N

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -123,6 +123,12 @@ class ContiguousBlobAccumulator { return encodeULEB128(Val, OS); } + unsigned writeSLEB128(int64_t Val) { +if (!checkLimit(10)) MaskRay wrote: Yes, LEB128 representing 64-bit integer needs at most 10 bytes. I added a change det

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,18 @@ +# REQUIRES: powerpc-registered-target +## Test CREL for a 32-bit big-endian target. MaskRay wrote: Thanks for the suggestion. Changed ppc to arm. For static relocations, the RELA form is exclusively used as recommended toolchain practice. htt

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags, WriteWord(EntrySize); // sh_entsize } +template +static void encodeCrel(ArrayRef Relocs, raw_ostream &os) { + uint OffsetMask = 8, Offset = 0, Addend = 0; + uint32_t Symi

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
@@ -1278,29 +1285,69 @@ void ELFState::writeSectionContent( if (!Section.Relocations) return; + const bool IsCrel = Section.Type == llvm::ELF::SHT_CREL; const bool IsRela = Section.Type == llvm::ELF::SHT_RELA; + typename ELFT::uint OffsetMask = 8, Offset = 0, Addend

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91280 >From a0cfafb82db825512b0ca44778fa9d4bb435563d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 6 May 2024 15:37:50 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92704 >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH 1/2] HLSL Default and Relaxed Availability Diagnostics (#3) --- cl

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-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 3f33c4c14e79e68007cf1460e4a0e606eb199da5 433b8e142d05a8fe2206ae0cec62423b21e792d2 --

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/92703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] - do not merge - Default and Relaxed Availability Diagnostics (PR #92703)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/92704 None >From 433b8e142d05a8fe2206ae0cec62423b21e792d2 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Sun, 19 May 2024 11:10:38 -0700 Subject: [PATCH] HLSL Default and Relaxed Availability Diagnostics (#3) ---

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92703)

2024-05-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 3f33c4c14e79e68007cf1460e4a0e606eb199da5 35d72822b298d77b4d73cb6b92fd218c4722e6b6 --

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/89809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3f33c4c - [Clang][HLSL] Add environment parameter to availability attribute (#89809)

2024-05-19 Thread via cfe-commits
Author: Helena Kotas Date: 2024-05-19T10:46:12-07:00 New Revision: 3f33c4c14e79e68007cf1460e4a0e606eb199da5 URL: https://github.com/llvm/llvm-project/commit/3f33c4c14e79e68007cf1460e4a0e606eb199da5 DIFF: https://github.com/llvm/llvm-project/commit/3f33c4c14e79e68007cf1460e4a0e606eb199da5.diff

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/92699 >From f8cd2539fb7f0388d7f3955f58b61b09da03bf0c Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Sun, 19 May 2024 18:43:08 +0700 Subject: [PATCH] [clang] Macro for constant rounding mode MIME-Version: 1.0 Conten

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-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 643f36184bd3d9a95cbfd608af6f169e0187 15b6edbcc8fe4559e9a9d8930f88dbbb6ed38b8c --

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-19 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/92699 The forthcoming C standard defines pragma FENV_ROUND to support constant rounding mode. It also requires some functions to be evaluated with such mode, N3096 7.6.2p4 states: Within the scope of an FENV_ROU

[clang] 643f361 - HLSL availability diagnostics design doc (#92207)

2024-05-19 Thread via cfe-commits
Author: Helena Kotas Date: 2024-05-19T09:27:56-07:00 New Revision: 643f36184bd3d9a95cbfd608af6f169e0187 URL: https://github.com/llvm/llvm-project/commit/643f36184bd3d9a95cbfd608af6f169e0187 DIFF: https://github.com/llvm/llvm-project/commit/643f36184bd3d9a95cbfd608af6f169e0187.diff

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/92207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-19 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/92207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2024-05-19 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/74427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Skip tautological comparison if the comparison involves the 'size_t' type (PR #74427)

2024-05-19 Thread Shivam Gupta via cfe-commits
xgupta wrote: Sorry, I do have motivation to continue this patch now, hence closing it. Thank to reviewers for reviewing it. https://github.com/llvm/llvm-project/pull/74427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-19 Thread Xu Zhang via cfe-commits
@@ -1997,9 +1997,12 @@ def Convergent : InheritableAttr { def NoInline : DeclOrStmtAttr { let Spellings = [CustomKeyword<"__noinline__">, GCC<"noinline">, CXX11<"clang", "noinline">, C23<"clang", "noinline">, + CXX11<"msvc", "noinline">, C

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-19 Thread Xu Zhang via cfe-commits
@@ -0,0 +1,72 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -Wno-c++17-extensions simonzgx wrote: I removed the redundant unit tests, but no new test cases were added. I'm not sure if that's acceptable, because `[[msvc::noinline]]` is just an alias for `[[cla

  1   2   >