[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-26 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,165 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-O0-optnone -emit-llvm \ +// RUN: %s -o - | opt -S -passes=mem2reg | FileCheck %s + +// CHECK-LABEL: define dso_local half @test_convert_from_bf16_to_fp16( +// CHECK-SAME: bfloat noundef [[A:%.*]]) #

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-26 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-O0-optnone -emit-llvm \ +// RUN: %s -o - | opt -S -passes=mem2reg | FileCheck %s + +// CHECK-LABEL: define dso_local half @test_convert_from_bf16_to_fp16( +// CHECK-SAME: bfloat noundef [[A:%.*]]) #[

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-26 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
@@ -75,6 +76,7 @@ // RUN: --check-prefix=WARN12 %s // RUN: %clang -### -ffast-math -ffp-model=strict -c %s 2>&1 | FileCheck \ // RUN: --check-prefix=WARN12 %s +// WARN12: clang andykaylor wrote: The only purpose of the check here is to establish a referenc

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89477 >From 8ab931c4506f08685758a58f4cf7974c5254c3fa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 17:53:52 -0700 Subject: [PATCH 1/6] Clean up denormal handling with -ffp-model, -ffast-math, et

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/89477 >From 8ab931c4506f08685758a58f4cf7974c5254c3fa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 19 Apr 2024 17:53:52 -0700 Subject: [PATCH 1/7] Clean up denormal handling with -ffp-model, -ffast-math, et

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/89906 >From e87546f2bc0c7d213b6c1f2b414e0ce5335b3e47 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 24 Apr 2024 11:53:28 +0200 Subject: [PATCH 1/4] [Clang] Implement C++26 Attributes for Structured Bindings

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/90237 The intention isn't to add or change the information provided, but to improve clarity through some grammar fixes, improvements to the markdown, and so forth. >From a75aa14fcad6f346a3073ae88e91fa890e803422 M

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Aaron Ballman (AaronBallman) Changes The intention isn't to add or change the information provided, but to improve clarity through some grammar fixes, improvements to the markdown, and so forth. --- Patch is 84.98 KiB, truncated

[clang] [Clang][CodeGen] Segfault when compiling weird code (PR #90165)

2024-04-26 Thread Tim Pham via cfe-commits
https://github.com/timmyhoa closed https://github.com/llvm/llvm-project/pull/90165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

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

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
https://github.com/bogner requested changes to this pull request. There's a lot of churn here so I'm not 100% sure I saw all of the real changes, but I think I got them all. It might be nice to move the NFC parts into their own commit (if we actually need them, see my other comments). I don't

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -1171,18 +1181,27 @@ TEST(TripleTest, Normalization) { Triple::getOSTypeName(FirstOSType), Triple::getEnvironmentTypeName(FirstEnvType)}; for (int Arch = FirstArchType; Arch <= Triple::LastArchType; ++Arch) { -StringR

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -98,9 +103,47 @@ std::optional tryParseProfile(StringRef Profile) { else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor)) return std::nullopt; - // dxil-unknown-shadermodel-hull + // Determine DXIL version number using the minor version number of Shader + // Mo

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-V

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType SubArch) { if (SubArch == AArch64SubArch_arm64e) return "arm64e"; break; + case Triple::dxil: +switch (SubArch) { +case Triple::DXILSubArch_v1_0: + return "dxilv1.0"; +

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-26 Thread Justin Bogner via cfe-commits
@@ -2,39 +2,45 @@ // Supported targets // -// RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-VALID %s -// RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-V

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes This PR fix the issue reported by @alexfh PR https://github.com/llvm/llvm-project/pull/89567 fix the `#pragma unroll N` crash issue in dependent context, but it's introduce an new issue: If `N` is value dependent

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90240 >From 131783211a23d007b5b6f1d5691306df4dec716b Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 27 Apr 2024 01:38:34 +0800 Subject: [PATCH 1/2] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in depe

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-26 Thread via cfe-commits
yronglin wrote: Sorry, I didn't find this problem last time I reviewed https://github.com/llvm/llvm-project/pull/89567. @alexfh Seems this issue introduced by https://github.com/llvm/llvm-project/pull/89567, I've a PR to fix it https://github.com/llvm/llvm-project/pull/90240. https://github.

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 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 bf67610a8ac07ec143f243f129eecd456aa63383 131783211a23d007b5b6f1d5691306df4dec716b --

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/90240 This PR fix the issue reported by @alexfh PR https://github.com/llvm/llvm-project/pull/89567 fix the `#pragma unroll N` crash issue in dependent context, but it's introduce an new issue: If `N` is value depen

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread via cfe-commits
yronglin wrote: I'd like to add more test to check CodeGen works well. https://github.com/llvm/llvm-project/pull/90240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: This may need some release notes adjustments as well; I already have a todo to revisit the release notes around release time to make sure we get the summary of the denormal handling flag changes right. https://github.com/llvm/llvm-project/pull/89477

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-04-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This is causing new/delete mismatch https://lab.llvm.org/buildbot/#/builders/168/builds/20063 ``` = ==2164144==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x503035b0 in thread T0: object passed to

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -109,16 +109,20 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, SetHints(LoopHintAttr::Unroll, LoopHintAttr::Disable); } else if (PragmaName == "unroll") { // #pragma unroll N -if (ValueExpr && !ValueExpr->isValueDependent()) { -

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -109,16 +109,20 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, SetHints(LoopHintAttr::Unroll, LoopHintAttr::Disable); } else if (PragmaName == "unroll") { // #pragma unroll N -if (ValueExpr && !ValueExpr->isValueDependent()) { -

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -124,3 +124,40 @@ void test(int *List, int Length) { #pragma unroll /* expected-error {{expected statement}} */ } + +using size_t = unsigned long long; + +template erichkeane wrote: This test isn't particularly good, since it is validating that it 'parses

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-26 Thread Eli Friedman via cfe-commits
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, CodeGen::CodeGenModule &CGM = CGF.CGM; ConstantEmitter Emitter(CGF); LangAS AS = ArrayQTy.getAddressSpace(); +if (CGF.getLangOpts().OpenCL) + AS = LangAS::openc

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-26 Thread Eli Friedman via cfe-commits
@@ -536,6 +536,8 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, CodeGen::CodeGenModule &CGM = CGF.CGM; ConstantEmitter Emitter(CGF); LangAS AS = ArrayQTy.getAddressSpace(); +if (CGF.getLangOpts().OpenCL) + AS = LangAS::openc

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/6] Fix bug with constexpr initialization. --- clang/lib/Parse/ParseD

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
katzdm wrote: This ended up being a lot more subtle than I expected. My latest push proposes a different solution; @cor3ntin and @efriedma-quic - please let me know your thoughts. This PR turns out to be a bug fix on the implementation of [P2564R3](https://wg21.link/p2564r3); as such, it onl

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -2554,16 +2554,27 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_if_present(D)) +return Var->isConstexpr()

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-26 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: The test failure on Windows is not related to this PR. https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b2098db - [APINotes] Allow annotating a C++ type as non-copyable in Swift

2024-04-26 Thread via cfe-commits
Author: Egor Zhdan Date: 2024-04-26T19:30:08+01:00 New Revision: b2098db2485331e01503e1452a7a60cd8c031a3f URL: https://github.com/llvm/llvm-project/commit/b2098db2485331e01503e1452a7a60cd8c031a3f DIFF: https://github.com/llvm/llvm-project/commit/b2098db2485331e01503e1452a7a60cd8c031a3f.diff LO

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-26 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 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 6904e0e8852a587b49a673055997e88855f219ea ec17c7668650add013f321453007191740e144e6 --

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl created https://github.com/llvm/llvm-project/pull/90248 This currently only defines a constant, but in the future will be used to gate builtins for experimenting and prototyping half-precision proposal (https://github.com/WebAssembly/half-precision). >From 09834

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -244,8 +244,8 @@ namespace UndefinedBehavior { constexpr int n13 = n5 + n5; // expected-error {{constant expression}} expected-note {{value -4294967296 is outside the range of }} constexpr int n14 = n3 - n5; // expected-error {{constant expression}} expected-note {{

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: LGTM. May be no need for the "etc" in the title of the patch? Thanks. https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Brendan Dahl (brendandahl) Changes This currently only defines a constant, but in the future will be used to gate builtins for experimenting and prototyping half-precision proposal (https://github.com/WebAssembly/half-precis

[clang] [HLSL] Shore up floating point conversions (PR #90222)

2024-04-26 Thread Chris B via cfe-commits
@@ -0,0 +1,229 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -Wconversion -verify -o - %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type -finclude-default-header -ast-dump %s | FileCheck %

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
@@ -1032,17 +1043,15 @@ int f() { namespace GH57682 { void test() { - constexpr auto l1 = []() consteval { // expected-error {{cannot take address of consteval call operator of '(lambda at}} \ - // expected-note 2{{declared here}} + co

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/7] Fix bug with constexpr initialization. --- clang/lib/Parse/ParseD

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm edited https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From 218ffb6d5a03c96d46bfecdb4490277809f5b62e Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/7] Fix bug with constexpr initialization. --- clang/lib/Parse/ParseD

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Fangrui Song via cfe-commits
@@ -64,7 +64,8 @@ // RUN: %clang -### -ffp-model=strict -fdenormal-fp-math=preserve-sign,preserve-sign -c %s 2>&1 \ MaskRay wrote: You can use `-### -Werror` to ensure that there is no warning. (In the absence of a `--target=`, you probably want to check a f

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-04-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78112 >From 92f8720e3d21521b589d5291f086a2f32b87bfe0 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 14 Jan 2024 19:52:31 + Subject: [PATCH] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing co

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-04-26 Thread Mital Ashok via cfe-commits
MitalAshok wrote: New version gives a pedantic warning if this is used before C++23 (and it is a substitution failure before C++23) https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] 56c4971 - [Driver, test] Replace CHECK-NOT: warning with -### -Werror

2024-04-26 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-26T11:59:03-07:00 New Revision: 56c4971d33230607a7329bb831b6c8588231e872 URL: https://github.com/llvm/llvm-project/commit/56c4971d33230607a7329bb831b6c8588231e872 DIFF: https://github.com/llvm/llvm-project/commit/56c4971d33230607a7329bb831b6c8588231e872.diff

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp ---> sr

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit that is rather shallow due to sheer amount of text, but it still took me more like 90 minutes. Hope you find it useful. https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` or a ``module interface partition unit``. -* An ``importable module unit`` refers to either a ``module interface uni

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -279,8 +266,9 @@ we could put ``-x c++-module`` in front of the file. For example, return 0; } -Now the filename of the ``module interface`` ends with ``.cpp`` instead of ``.cppm``, -we can't compile them by the original command lines. But we are still able to do i

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module implemen

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -432,9 +424,8 @@ The following example is not allowed: $ clang++ -std=c++20 M.cppm --precompile -o M.pcm $ clang++ -std=c++23 Use.cpp -fprebuilt-module-path=. -The compiler would reject the example due to the inconsistent language options. -Not all options are language

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -776,9 +773,9 @@ export-using style using decl_n; } -As the example shows, you need to include all the headers containing declarations needs -to be exported and `using` such declarations in an `export` block. Then, basically, -we're done. +This example shows how to

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -1817,27 +1804,29 @@ But with optimizations, things are different: │ │ └---┘ -It would be very unfortunate if we end up with worse performance after using modules. -Th

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89992 >From 6e77e37977bbecc8053d12b4db3f790042b8f34d Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 24 Apr 2024 11:12:28 -0700 Subject: [PATCH 1/2] [clang][modules] Allow including module maps to be non-af

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89992 >From 8c2989ffe7b6e61b32facf831aa7eeabbf0001d2 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 24 Apr 2024 11:12:28 -0700 Subject: [PATCH 1/2] [clang][modules] Allow including module maps to be non-af

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-26 Thread Fangrui Song via cfe-commits
MaskRay wrote: > FYI I'm seeing about 0.6% compile-time regressions for `O0` test-suite builds > with this change > ([llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=instructions:u](https://llvm-compile-tim

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89992 >From 8c2989ffe7b6e61b32facf831aa7eeabbf0001d2 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 24 Apr 2024 11:12:28 -0700 Subject: [PATCH 1/3] [clang][modules] Allow including module maps to be non-af

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89992 >From 8c2989ffe7b6e61b32facf831aa7eeabbf0001d2 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 24 Apr 2024 11:12:28 -0700 Subject: [PATCH 1/3] [clang][modules] Allow including module maps to be non-af

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 ready_for_review https://github.com/llvm/llvm-project/pull/89992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes The dependency scanner only puts top-level affecting module map files on the command line for explicitly building a module. This is done because any affecting child module map files should be referenced

[clang] 1b7db40 - [HLSL][SPIR-V] Target `directx` is required

2024-04-26 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2024-04-26T15:07:13-04:00 New Revision: 1b7db405b97cc350e2de243683273e9946fc0bd0 URL: https://github.com/llvm/llvm-project/commit/1b7db405b97cc350e2de243683273e9946fc0bd0 DIFF: https://github.com/llvm/llvm-project/commit/1b7db405b97cc350e2de243683273e9946fc0bd0.diff

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Perhaps add a `[Driver] ` tag https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Add half-precision feature (PR #90248)

2024-04-26 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. LGTM. We can always bikeshed the feature name later if we want. https://github.com/llvm/llvm-project/pull/90248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > LGTM. May be no need for the "etc" in the title of the patch? Thanks. The "etc." is eliding -fno-fast-math, -funsafe-math-optimizations, and -fno-unsafe-math-optimizations https://github.com/llvm/llvm-project/pull/89477 ___ cfe-co

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > The "etc." is eliding -fno-fast-math, -funsafe-math-optimizations, and > -fno-unsafe-math-optimizations Maybe "fast-math-ish flags" is a good summary of the lot? https://github.com/llvm/llvm-project/pull/89477 ___ cfe-commits

[clang] Clean up denormal handling with -ffp-model, -ffast-math, etc. (PR #89477)

2024-04-26 Thread Andy Kaylor via cfe-commits
@@ -64,7 +64,8 @@ // RUN: %clang -### -ffp-model=strict -fdenormal-fp-math=preserve-sign,preserve-sign -c %s 2>&1 \ andykaylor wrote: I didn't intend to change the logic of this test. The behavior here should be target-independent now. https://github.com/ll

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` or a ``module interface partition unit``. -* An ``importable module unit`` refers to either a ``module interface uni

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

2024-04-26 Thread Helena Kotas via cfe-commits
@@ -1016,7 +1016,34 @@ static llvm::StringRef canonicalizePlatformName(llvm::StringRef Platform) { .Case("visionos_app_extension", "xros_app_extension") .Case("ShaderModel", "shadermodel") .Default(Platform); -} }]; +} +static llvm::Strin

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-26 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The approach makes sense. I'll defer to someone who's more familiar with this code for the full review. https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang] solve crash due to function overloading. (PR #90255)

2024-04-26 Thread via cfe-commits
https://github.com/lolloz98 created https://github.com/llvm/llvm-project/pull/90255 Closes #88917 I am a newby in llvm development. I followed the suggestion for solving the issue. I added just a simple test to verify that the compilation does not crash. Should the test not be good enough

[clang] [clang] solve crash due to function overloading. (PR #90255)

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

[clang] [clang] solve crash due to function overloading. (PR #90255)

2024-04-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: None (lolloz98) Changes Closes #88917 I am a newby in llvm development. I followed the suggestion for solving the issue. I added just a simple test to verify that the compilation does not crash. Shou

[clang] [clang-format] Add a space after a word token only if required (PR #90161)

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

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Erich Keane via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

<    1   2   3   4   5   >