@@ -605,12 +606,197 @@ class SIGfx12CacheControl : public SIGfx11CacheControl {
bool IsNonTemporal) const override;
};
+class SIPreciseMemorySupport {
+protected:
+ const GCNSubtarget &ST;
+ const SIInstrInfo *TII = nullptr;
+
+ IsaVers
@@ -605,12 +606,197 @@ class SIGfx12CacheControl : public SIGfx11CacheControl {
bool IsNonTemporal) const override;
};
+class SIPreciseMemorySupport {
+protected:
+ const GCNSubtarget &ST;
+ const SIInstrInfo *TII = nullptr;
+
+ IsaVers
@@ -167,6 +167,10 @@ def FeatureCuMode : SubtargetFeature<"cumode",
"Enable CU wavefront execution mode"
>;
+def FeaturePreciseMemory
Pierre-vh wrote:
Understood :)
Can you remove the `amdgpu` prefix from the option? All target features are
already specif
@@ -0,0 +1,362 @@
+; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=+amdgpu-precise-memory-op < %s
| FileCheck %s -check-prefixes=GFX9
+; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -mattr=+amdgpu-precise-memory-op < %s
| FileCheck %s -check-prefixes=GFX90A
+; RUN: llc -mtriple=amdgcn -
@@ -605,12 +606,197 @@ class SIGfx12CacheControl : public SIGfx11CacheControl {
bool IsNonTemporal) const override;
};
+class SIPreciseMemorySupport {
Pierre-vh wrote:
Why does it need to be a separate class hierarchy?
It
https://github.com/Pierre-vh requested changes to this pull request.
When you made changes, you can click the "Re-request review" icon next to
reviewers to put it back in the review queues :)
https://github.com/llvm/llvm-project/pull/79236
___
cfe-com
https://github.com/Pierre-vh edited
https://github.com/llvm/llvm-project/pull/79236
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/petrhosek approved this pull request.
https://github.com/llvm/llvm-project/pull/80763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
Looks pretty good!
Are there further changes you're planning to make, or is this ready to graduate
from "Draft" status?
https://github.com/llvm/llvm-project/pull/78454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
david-xl wrote:
> > > > I don't understand, if you're saying the profile is accurate, then
> > > > those functions are actually cold, so we should be able to mark them as
> > > > optsize?
> > >
> > >
> > > Accurate is not black or white. The current heuristic requires certain
> > > level of
https://github.com/MaskRay approved this pull request.
https://github.com/llvm/llvm-project/pull/80763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/80802
>From 741793c9584753e6e888c9824961501b676b1143 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Tue, 6 Feb 2024 14:06:40 +0800
Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda
expression decla
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/80802
>From 6dbd0937e8ded4dd8f71afb876bb3930c309 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Tue, 6 Feb 2024 14:06:40 +0800
Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda
expression decla
shaojingzhi wrote:
Hi! I wonder that have you conducted any tests to determine the potential
performance increase of this pass in the SPEC2017 557xz benchmark? I attempted
to apply it to the xz benchmark, but only one copy(--copies=1) demonstrated a
significant increase(about 3%), but there wa
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Qizhi Hu (jcsxky)
Changes
Try to fix [issue](https://github.com/llvm/llvm-project/issues/76674)
When transform a lambda expression which is declared in an unevaluated context,
`isInstantiationDependentType()` and `isVariablyModifiedType()`
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/80802
Try to fix [issue](https://github.com/llvm/llvm-project/issues/76674)
When transform a lambda expression which is declared in an unevaluated context,
`isInstantiationDependentType()` and `isVariablyModifiedType()`
WenleiHe wrote:
> > > I don't understand, if you're saying the profile is accurate, then those
> > > functions are actually cold, so we should be able to mark them as optsize?
> >
> >
> > Accurate is not black or white. The current heuristic requires certain
> > level of accuracy to be effect
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Erick Velez (evelez7)
Changes
Require a template argument list after an identifier prefixed by the template
keyword. Introduced by [CWG
96](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96).
Current wording of [temp.names
https://github.com/evelez7 created
https://github.com/llvm/llvm-project/pull/80801
Require a template argument list after an identifier prefixed by the template
keyword. Introduced by [CWG
96](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96). Current
wording of [temp.names] i
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -ffixed-point -S -emit-llvm %s -o - | FileCheck %s
+
+// CHECK: @_ZL1a = internal constant [2 x i32] zeroinitializer
+constexpr _Accum a[2] = {};
MaskRay wrote:
Consider a `test/AST/` test like `static_assert(a[0] == 0 && a[0]
@@ -1612,6 +1613,14 @@
// RUN: -o - | FileCheck --check-prefix=CHECK-SUPM-EXT %s
// CHECK-SUPM-EXT: __riscv_supm 8000{{$}}
+// RUN: %clang --target=riscv32 -menable-experimental-extensions \
+// RUN: -march=rv32i_ssqosid1p0 -E -dM %s \
+// RUN: -o - | FileCheck --check-p
@@ -1612,6 +1613,14 @@
// RUN: -o - | FileCheck --check-prefix=CHECK-SUPM-EXT %s
// CHECK-SUPM-EXT: __riscv_supm 8000{{$}}
+// RUN: %clang --target=riscv32 -menable-experimental-extensions \
+// RUN: -march=rv32i_ssqosid1p0 -E -dM %s \
+// RUN: -o - | FileCheck --check-p
@@ -1612,6 +1613,14 @@
// RUN: -o - | FileCheck --check-prefix=CHECK-SUPM-EXT %s
// CHECK-SUPM-EXT: __riscv_supm 8000{{$}}
+// RUN: %clang --target=riscv32 -menable-experimental-extensions \
+// RUN: -march=rv32i_ssqosid1p0 -E -dM %s \
+// RUN: -o - | FileCheck --check-p
@@ -248,10 +248,11 @@ X86_FEATURE_COMPAT(AVXVNNIINT16,"avxvnniint16",
0)
X86_FEATURE_COMPAT(SM3, "sm3",0)
X86_FEATURE_COMPAT(SHA512, "sha512", 0)
X86_FEATURE_COMPAT(SM4, "sm4",
@@ -61,6 +61,7 @@ void testArraySubscripts(int *p, int **pp) {
);
int a[10]; // expected-warning{{'a' is an unsafe buffer that does
not perform bounds checks}}
+// expected-note@-1{{change type of 'a' to
'std::array' to harden it}}
@@ -248,10 +248,11 @@ X86_FEATURE_COMPAT(AVXVNNIINT16,"avxvnniint16",
0)
X86_FEATURE_COMPAT(SM3, "sm3",0)
X86_FEATURE_COMPAT(SHA512, "sha512", 0)
X86_FEATURE_COMPAT(SM4, "sm4",
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 8f80df0f52c4294d23d0510b01be6d6491714058
90e7145fe0133828b4abc16730b9786fc68df8b9 --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (jkorous-apple)
Changes
Debug notes for unclaimed DeclRefExpr should report any DRE of an unsafe
variable that is not covered by a Fixable (i. e. fixit for the particular AST
pattern isn't implemented for whatever reason). Currently
https://github.com/jkorous-apple created
https://github.com/llvm/llvm-project/pull/80787
Debug notes for unclaimed DeclRefExpr should report any DRE of an unsafe
variable that is not covered by a Fixable (i. e. fixit for the particular AST
pattern isn't implemented for whatever reason). Curren
brad0 wrote:
Ping.
https://github.com/llvm/llvm-project/pull/75841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: None (ZijunZhaoCCK)
Changes
Add isWasm() check for here:
https://github.com/llvm/llvm-project/pull/78655#issuecomment-1928075569
---
Full diff: https://github.com/llvm/llvm-project/pull/80783.diff
1 Files Affected:
- (modified)
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (ZijunZhaoCCK)
Changes
Add isWasm() check for here:
https://github.com/llvm/llvm-project/pull/78655#issuecomment-1928075569
---
Full diff: https://github.com/llvm/llvm-project/pull/80783.diff
1 Files Affected:
- (modified) clang/l
https://github.com/ZijunZhaoCCK created
https://github.com/llvm/llvm-project/pull/80783
Add isWasm() check for here:
https://github.com/llvm/llvm-project/pull/78655#issuecomment-1928075569
>From 84506beecc20a064a5c895cf5c04135118da6606 Mon Sep 17 00:00:00 2001
From: zijunzhao
Date: Tue, 6 Feb
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl
&RenameDecl,
Conflict->getLocation().printToString(ASTCtx.getSourceManager())};
}
}
- if (Result)
+ if (Result) {
InvalidNameMetric.record(1, toString(Result->K));
+return makeError(*Re
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 cf401f72e1b5aa6be0719ab45c95c10ea06bec9a
916a10f1cebbb339dec98bd18c945b63991190f1 --
drodriguez wrote:
I agree with Dmitry in that it would be preferred to have the system compiler
behaviour until the system compiler actually changes.
I have tried again with Xcode 14.3.1 (released almost 1 year ago), which
includes `include/c++/v1` side by side with the compiler, and for it, p
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (PiJoules)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/80781.diff
2 Files Affected:
- (modified) clang/lib/AST/ExprConstant.cpp (+4)
- (added) clang/test/CodeGenCXX/fixed-point-zero-init.cpp (+9)
`
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/80594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Younan Zhang
Date: 2024-02-06T09:59:16+08:00
New Revision: 2c2d291b4568381999442e47fc77f949f19be0bc
URL:
https://github.com/llvm/llvm-project/commit/2c2d291b4568381999442e47fc77f949f19be0bc
DIFF:
https://github.com/llvm/llvm-project/commit/2c2d291b4568381999442e47fc77f949f19be0bc.diff
https://github.com/PiJoules created
https://github.com/llvm/llvm-project/pull/80781
None
>From 916a10f1cebbb339dec98bd18c945b63991190f1 Mon Sep 17 00:00:00 2001
From: Leonard Chan
Date: Mon, 5 Feb 2024 17:58:08 -0800
Subject: [PATCH] [clang] Add zero-initialization for fixed point types
---
https://github.com/aheejin updated
https://github.com/llvm/llvm-project/pull/80775
>From dbb74ca85ef047260a2820f6d470448279ea44f4 Mon Sep 17 00:00:00 2001
From: Heejin Ahn
Date: Tue, 6 Feb 2024 00:51:40 +
Subject: [PATCH 1/2] [WebAssembly] Add tests for generic CPU config
This adds tests f
jrtc27 wrote:
My thoughts on this in the past have been:
1. target-abi should really be a target-independent thing we record; its
meaning depends on the target, but the ABI exists throughout LLVM as a concept
regardless of the target
2. module-level target features in general likely should be
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Heejin Ahn (aheejin)
Changes
This adds tests for `generic` cpu configuration. We had tests for `mvp` and
`bleeding-edge` configs but not `generic`.
---
Full diff: https://github.com/llvm/llvm-project/pull/80775.diff
2 Files Affected:
-
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
Author: Heejin Ahn (aheejin)
Changes
This adds tests for `generic` cpu configuration. We had tests for `mvp` and
`bleeding-edge` configs but not `generic`.
---
Full diff: https://github.com/llvm/llvm-project/pull/80775.diff
2 Files Affec
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/80775
This adds tests for `generic` cpu configuration. We had tests for `mvp` and
`bleeding-edge` configs but not `generic`.
>From dbb74ca85ef047260a2820f6d470448279ea44f4 Mon Sep 17 00:00:00 2001
From: Heejin Ahn
Da
topperc wrote:
> I'm surprised only 1 test file needed the metadata updated as a result of
> this change.
Maybe other tests are better about using regexes to hide the numbers?
https://github.com/llvm/llvm-project/pull/80760
___
cfe-commits mailing li
https://github.com/ilovepi approved this pull request.
Thank you for this. I expect this to be a big help w/ the various target
features bugs we've seen in LTO builds.
I'm surprised only 1 test file needed the metadata updated as a result of this
change.
https://github.com/llvm/llvm-project/p
ZijunZhaoCCK wrote:
> > > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread,
> > > which I suppose are equally broken by this change.
> >
> >
> > Yes, I think so. I think adding these environment types in wasi-libc repo
> > could help fix those errors.
>
> If wasm can arbi
rapidsna wrote:
> It's generally not a good idea to use sugar to represent constructs that are
> semantically significant: anything that uses the canonical type will throw it
> away. We try to avoid throwing away sugar in most cases, but we aren't always
> successful.
> It's possible there ar
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 820f244aa92f11292e59440c9bc5afbdec395b20
c630eee1f930c87d2c461de92271c02de220b290 --
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/80519
>From 6ab5ba3f970eaaea542fbed09cae17d3666df6b3 Mon Sep 17 00:00:00 2001
From: Reid Kleckner
Date: Sat, 3 Feb 2024 00:18:42 +
Subject: [PATCH 1/3] wip
---
clang/lib/AST/Expr.cpp | 12
rnk wrote:
> Also in the issue: #80510 you pointed out a crash bug. We should have the bug
> covered in the test case as well.
I think that is covered by the existing test case, instead of crashing, we now
reject with an error. In the future if we want to align with GCC as you
suggest, we'll
@@ -108,3 +109,22 @@ int computed_with_lambda = [] {
return result;
}();
#endif
+
+#if __cplusplus >= 201703L
+namespace DynamicFileScopeLiteral {
+// This covers the case where we have a file-scope compound literal with a
+// non-constant initializer in C++. Previously, we h
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/80519
>From 6ab5ba3f970eaaea542fbed09cae17d3666df6b3 Mon Sep 17 00:00:00 2001
From: Reid Kleckner
Date: Sat, 3 Feb 2024 00:18:42 +
Subject: [PATCH 1/2] wip
---
clang/lib/AST/Expr.cpp | 12
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/80768
>From f9f11843c2d09775de20d47dc71c5e482a1ff8b4 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 5 Feb 2024 16:07:09 -0800
Subject: [PATCH] Fix a crash in clang::isGetterOfRefCounted by checking
nullptr in try
https://github.com/AntonBikineev updated
https://github.com/llvm/llvm-project/pull/80765
>From 88151098d3087f95d3a5b652309a12fb2e9f757e Mon Sep 17 00:00:00 2001
From: Anton Bikineev
Date: Mon, 5 Feb 2024 12:24:17 +0100
Subject: [PATCH] [clang] Support per-function [[clang::code_align(N)]]
attr
https://github.com/bjope approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/80515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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 6ce03ff3fef8fb6fa9afe8eb22c6d98bced26d48
4e10436ddd55f1b1bed2bb99856e1101b9462117 --
andykaylor wrote:
> > (Sidenote: "dynamic" isn't even
> > [documented](https://clang.llvm.org/docs/UsersManual.html#cmdoption-fdenormal-fp-math)).
>
> It's not a selectable enum of the Clang `-fdenormal-fp-math` flag, but it is
> one for the LLVM function attribute `denormal-fp-math`.
This is
llvmbot wrote:
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Ryosuke Niwa (rniwa)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/80768.diff
2 Files Affected:
- (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+8-6)
- (added) clang/test/Analys
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/80768
None
>From 4e10436ddd55f1b1bed2bb99856e1101b9462117 Mon Sep 17 00:00:00 2001
From: Ryosuke Niwa
Date: Mon, 5 Feb 2024 16:07:09 -0800
Subject: [PATCH] Fix a crash in clang::isGetterOfRefCounted by checking
nullptr
https://github.com/jhuber6 closed
https://github.com/llvm/llvm-project/pull/80741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Joseph Huber
Date: 2024-02-05T17:58:19-06:00
New Revision: dbed89814e5b9ba25a349a5b9acf4a7164e33834
URL:
https://github.com/llvm/llvm-project/commit/dbed89814e5b9ba25a349a5b9acf4a7164e33834
DIFF:
https://github.com/llvm/llvm-project/commit/dbed89814e5b9ba25a349a5b9acf4a7164e33834.diff
MaskRay wrote:
> > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which
> > I suppose are equally broken by this change.
>
> Yes, I think so. I think adding these environment types in wasi-libc repo
> could help fix those errors.
If wasm can arbitrary environment types,
https://github.com/AntonBikineev updated
https://github.com/llvm/llvm-project/pull/80765
>From 99d2cc55fb952361b1fe04e2c21dcb5b04f11d47 Mon Sep 17 00:00:00 2001
From: Anton Bikineev
Date: Mon, 5 Feb 2024 12:24:17 +0100
Subject: [PATCH] [clang] Support per-function [[clang::code_align(N)]]
attr
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 a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de
ff8cf4e87473dec2e3f55114cb92ae5a63d9488c --
glandium wrote:
> Yes, I think so. I think adding these environment types in wasi-libc repo
> could help fix those errors.
WDYM?
https://github.com/llvm/llvm-project/pull/78655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Anton Bikineev (AntonBikineev)
Changes
The existing attribute works only for loop headers. This can unfortunately be
quite limiting, especially as a protection against the "Jump Conditional Code
Erratum" [0] (for example, if there i
https://github.com/AntonBikineev created
https://github.com/llvm/llvm-project/pull/80765
The existing attribute works only for loop headers. This can unfortunately be
quite limiting, especially as a protection against the "Jump Conditional Code
Erratum" [0] (for example, if there is an unalign
ZijunZhaoCCK wrote:
> There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which I
> suppose are equally broken by this change.
Yes, I think so. I think adding these environment types in wasi-libc repo could
help fix those errors.
https://github.com/llvm/llvm-project/pull/786
andykaylor wrote:
I don't know anything about how non-x86 targets implement DAZ/FTZ, but for
x86-based targets, I think trying to make any assumptions about the setting is
bound to be wrong. In theory, it's part of the floating-point environment and
shouldn't be modified during execution unles
https://github.com/PiJoules updated
https://github.com/llvm/llvm-project/pull/80763
>From 81e2325ee9600e6a41de51fc26963147617f4ad6 Mon Sep 17 00:00:00 2001
From: Leonard Chan
Date: Mon, 5 Feb 2024 15:33:09 -0800
Subject: [PATCH] [Clang] Diagnose improper fixed point conversions in C++
---
cla
llvmbot wrote:
@llvm/pr-subscribers-debuginfo
Author: None (PiJoules)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/80763.diff
4 Files Affected:
- (modified) clang/include/clang/AST/Type.h (+7)
- (modified) clang/lib/Sema/SemaOverload.cpp (+4-1)
- (modified) clang
https://github.com/PiJoules created
https://github.com/llvm/llvm-project/pull/80763
None
>From faf74616efab09e59aade180ce44b68e04259e0e Mon Sep 17 00:00:00 2001
From: Leonard Chan
Date: Mon, 5 Feb 2024 14:55:34 -0800
Subject: [PATCH 1/2] [llvm] Fix assertion error where we didn't check fixed
https://github.com/AdamMagierFOSS updated
https://github.com/llvm/llvm-project/pull/80515
>From 4e1c37ae83dec050fc9b7aa172db01fa0b2b6d68 Mon Sep 17 00:00:00 2001
From: Adam Magier
Date: Sat, 3 Feb 2024 00:38:54 +0100
Subject: [PATCH 1/3] [clang][CodeGen][UBSan] Fixing shift-exponent generation
https://github.com/AdamMagierFOSS edited
https://github.com/llvm/llvm-project/pull/80515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -108,3 +109,22 @@ int computed_with_lambda = [] {
return result;
}();
#endif
+
+#if __cplusplus >= 201703L
+namespace DynamicFileScopeLiteral {
+// This covers the case where we have a file-scope compound literal with a
+// non-constant initializer in C++. Previously, we h
llvmbot wrote:
@llvm/pr-subscribers-backend-risc-v
Author: Craig Topper (topperc)
Changes
In an LTO build, we don't set the ELF attributes to indicate what extensions
were compiled with. The target CPU/Attrs in RISCVTargetMachine do not get set
for an LTO build. Each function gets a targ
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-codegen
Author: Craig Topper (topperc)
Changes
In an LTO build, we don't set the ELF attributes to indicate what extensions
were compiled with. The target CPU/Attrs in RISCVTargetMachine do not get set
for an LTO build.
https://github.com/topperc created
https://github.com/llvm/llvm-project/pull/80760
In an LTO build, we don't set the ELF attributes to indicate what extensions
were compiled with. The target CPU/Attrs in RISCVTargetMachine do not get set
for an LTO build. Each function gets a target-cpu/featur
glandium wrote:
There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which I
suppose are equally broken by this change.
https://github.com/llvm/llvm-project/pull/78655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
glandium wrote:
We stumbled upon this downstream because we have jobs building wasi-sdk with
clang-trunk, and wasi-sdk builds some things with that target. It apparently
comes from https://github.com/WebAssembly/wasi-libc/pull/381
https://github.com/llvm/llvm-project/pull/78655
___
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 e296cedcd686e24fee75756185669f1bb3b47fdd
c3be3ebd7a8ae57d319eedbb97ab85324c814db2 --
@@ -1051,6 +1052,145 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr
*E, unsigned Type,
return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0,
IsSigned));
}
+namespace {
+
+/// \p StructBaseExpr returns the base \p Expr with a structure or union type
AdamMagierFOSS wrote:
> > One thing I'll preemptively address is I didn't know where to put the new
> > unit testing - creating a separate file seems a little heavy handed but I
> > see that there's a test for UBSan shift generation
> > (`clang/test/CodeGen/ubsan-shift.c`) and one for UBSan +
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 %s -O0 -fsanitize=shift-exponent -emit-llvm -o - |
FileCheck %s
+
+// Checking that the code generation is using the unextended/untruncated
+// exponent values and capping the values accordingly
+
+// CHECK-LABEL: define{{.*}} i32 @test_left_v
@@ -4121,6 +4121,13 @@ Value *ScalarExprEmitter::GetWidthMinusOneValue(Value*
LHS,Value* RHS) {
Ty = cast(VT->getElementType());
else
Ty = cast(LHS->getType());
+ // Testing with small _BitInt types has shown that Ty->getBitwidth() - 1
AdamMagierFOS
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 %s -O0 -fsanitize=shift-exponent -emit-llvm -o - |
FileCheck %s
AdamMagierFOSS wrote:
Sounds good, thank you for the recommendation!
https://github.com/llvm/llvm-project/pull/80515
___
https://github.com/AdamMagierFOSS updated
https://github.com/llvm/llvm-project/pull/80515
>From 4e1c37ae83dec050fc9b7aa172db01fa0b2b6d68 Mon Sep 17 00:00:00 2001
From: Adam Magier
Date: Sat, 3 Feb 2024 00:38:54 +0100
Subject: [PATCH 1/2] [clang][CodeGen][UBSan] Fixing shift-exponent generation
https://github.com/AdamMagierFOSS edited
https://github.com/llvm/llvm-project/pull/80515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling edited
https://github.com/llvm/llvm-project/pull/80256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bwendling edited
https://github.com/llvm/llvm-project/pull/80256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1051,6 +1052,145 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr
*E, unsigned Type,
return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0,
IsSigned));
}
+namespace {
+
+/// \p StructBaseExpr returns the base \p Expr with a structure or union type
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) {
!isAsciiIdentifierStart(Ident.front(), AllowDollar))
return false;
for (char C : Ident) {
+if (AllowColon && C == ':')
ahoppen wrote:
Oh, I just assumed that the fi
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl
&RenameDecl,
Conflict->getLocation().printToString(ASTCtx.getSourceManager())};
}
}
- if (Result)
+ if (Result) {
InvalidNameMetric.record(1, toString(Result->K));
+return makeError(*Re
https://github.com/bhamiltoncx edited
https://github.com/llvm/llvm-project/pull/80628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,3 @@
+// RUN: clang-format -dump-config 2>&1 | FileCheck %s
bhamiltoncx wrote:
Can you also add a test with `clang-format --assume-filename=foo.m -dump-config
2>&1 | FileCheck %s`?
It should result in `Language: ObjC`.
https://github.com/llvm/llvm-
https://github.com/bhamiltoncx approved this pull request.
Looks good. Can you add one more test, please?
https://github.com/llvm/llvm-project/pull/80628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
ZijunZhaoCCK wrote:
> This broke the wasi-threads target: `clang: error: version 'threads' in
> target triple 'wasm32-unknown-wasi-threads' is invalid`
Because `threads` is not in EnvironmentType list:
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/Triple.h#L231
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl
&RenameDecl,
Conflict->getLocation().printToString(ASTCtx.getSourceManager())};
}
}
- if (Result)
+ if (Result) {
InvalidNameMetric.record(1, toString(Result->K));
+return makeError(*Re
1 - 100 of 415 matches
Mail list logo