https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/98746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2916,9 +2916,30 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal,
llvm::LoadInst *Load =
Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile());
CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo());
- return makeNaturalAddressForPointer(Load
@@ -20,10 +20,10 @@ void test_add_template() {
// CHECK: %call = call noundef <10 x float>
@_Z3addIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(ptr noundef nonnull
align 4 dereferenceable(40) %Mat1, ptr noundef nonnull align 4
dereferenceable(40) %Mat2)
//
dtcxzyw wrote:
Ping.
https://github.com/llvm/llvm-project/pull/98746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw commented:
It is not obvious to judge whether this patch is profitable. Can you share some
performance data on SPEC/LLVM test-suite/your motivating case?
https://github.com/llvm/llvm-project/pull/135079
___
cfe-commits mail
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3467,13 +3485,23 @@ static bool
blockIsSimpleEnoughToThreadThrough(BasicBlock *BB) {
// live outside of the current basic block.
for (User *U : I.users()) {
Instruction *UI = cast(U);
- if (UI->getParent() != BB || isa(UI))
-return false;
+
@@ -3442,10 +3442,28 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst
*BI,
return true;
}
+typedef SmallPtrSet BlocksSet;
dtcxzyw wrote:
```suggestion
using BlocksSet = SmallPtrSet;
```
https://github.com/llvm/llvm-project/pull/135079
___
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/137851
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137851
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/137849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 6 May 2025 17:47:07 +0800
Subject: [PATCH 1/4] [Clang][CodeGen] Enable pointer overflow check for GCC
worka
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 6 May 2025 17:47:07 +0800
Subject: [PATCH 1/3] [Clang][CodeGen] Enable pointer overflow check for GCC
worka
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 6 May 2025 17:47:07 +0800
Subject: [PATCH 1/2] [Clang][CodeGen] Enable pointer overflow check for GCC
worka
@@ -4169,10 +4169,10 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137851
>From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 6 May 2025 17:47:07 +0800
Subject: [PATCH 1/4] [Clang][CodeGen] Enable pointer overflow check for GCC
worka
@@ -4169,10 +4169,10 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
@@ -4169,11 +4169,16 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137851
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/137849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/137849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 6 May 2025 17:47:07 +0800
Subject: [PATCH] [Clang][CodeGen] Enable pointer overflow check for GCC
workaroun
@@ -4169,11 +4169,16 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
@@ -4169,11 +4169,16 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/137849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 30 Apr 2025 01:26:41 +0800
Subject: [PATCH 1/4] [Clang][CodeGen] Check
`isUnderlyingBasePointerConstantNull
dtcxzyw wrote:
See also the response from the Clang Area Team:
https://discourse.llvm.org/t/rfc-implement-gcc-bound-pmf-in-clang/85951/7.
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137851
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 30 Apr 2025 01:26:41 +0800
Subject: [PATCH 1/5] [Clang][CodeGen] Check
`isUnderlyingBasePointerConstantNull
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 30 Apr 2025 01:26:41 +0800
Subject: [PATCH 1/3] [Clang][CodeGen] Check
`isUnderlyingBasePointerConstantNull
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF,
else
elemTy = CGF.ConvertTypeForMem(elementType);
- if (CGF.getLangOpts().PointerOverflowDefined)
+ if (CGF.getLangOpts().PointerOverflowDefined ||
+ CGF.isUnderlyingBasePointerConstan
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant {
/// block must be embedded into a function.
static BlockAddress *get(BasicBlock *BB);
+ /// Return a BlockAddress for the specified basic block, which may not be
+ /// part of a function. The specified typ
@@ -4820,6 +4820,9 @@ bool
CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) {
const Expr *UnderlyingBaseExpr = E->IgnoreParens();
while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr))
UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137851
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 30 Apr 2025 01:26:41 +0800
Subject: [PATCH 1/4] [Clang][CodeGen] Check
`isUnderlyingBasePointerConstantNull
dtcxzyw wrote:
> While we should omit inbounds, I think it would be good to not suppress the
> sanitizer. If the sanitizer doesn't warn about it, then things will never get
> better :(
Fixed.
https://github.com/llvm/llvm-project/pull/137849
___
cfe-
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/137849
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 30 Apr 2025 01:26:41 +0800
Subject: [PATCH 1/2] [Clang][CodeGen] Check
`isUnderlyingBasePointerConstantNull
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF,
else
elemTy = CGF.ConvertTypeForMem(elementType);
- if (CGF.getLangOpts().PointerOverflowDefined)
+ if (CGF.getLangOpts().PointerOverflowDefined ||
+ CGF.isUnderlyingBasePointerConstan
@@ -4820,6 +4820,9 @@ bool
CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) {
const Expr *UnderlyingBaseExpr = E->IgnoreParens();
while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr))
UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/137851
Closes https://github.com/llvm/llvm-project/issues/137833.
This patch is stacked on https://github.com/llvm/llvm-project/pull/137849.
>From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001
From
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/137849
Do not set inbounds on GEP when the pointer operand is a constant null.
Note: This patch is fragile :( For a more complex case `(int*)0 + offset1 +
offset2`, we still set inbounds for the second addition.
Rela
dtcxzyw wrote:
> Do we have a ubsan check for this?
We have a ubsan check on deref. I think it is enough.
https://github.com/llvm/llvm-project/pull/98746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s -O2 |
FileCheck %s
-// Make sure the call to b() doesn't get optimized out.
+// Make sure the call to b() is eliminated.
extern struct x {char& x,y;}y;
int b();
int a() { if (!&y.x) b();
@@ -2799,9 +2799,30 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal,
llvm::LoadInst *Load =
Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile());
CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo());
- return makeNaturalAddressForPointer(Load
dtcxzyw wrote:
> > IIRC this feature is orthogonal to GCC bound member functions. `declcall`
> > with a virtual method just returns a pmf, and we still need to perform
> > vtable lookup at the callsite: https://compiler-explorer.com/z/YrT3nPTEz
>
> Try `declcall(p->B::virtual_method())`?:
> h
dtcxzyw wrote:
> > We used this extension to improve virtual function calling performance,
> > there are simple and small virtual functions which are frequently called
> > and can not be eliminated and it is in a delegation thus compiler can not
> > optimize.
> > [toplingdb](https://github.com
dtcxzyw wrote:
@vitalybuka @mstorsjo Can you please provide the command to reproduce the wrong
IR/codegen?
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/dtcxzyw approved this pull request.
https://github.com/llvm/llvm-project/pull/136402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dtcxzyw wrote:
> This change broke a couple of ubsan tests on i686 on Windows (i.e. a 32 bit
> environment):
> https://github.com/mstorsjo/llvm-mingw/actions/runs/14527591706/job/40770945907
>
> The failing tests are
> https://github.com/llvm/llvm-project/blob/llvmorg-20.1.3/compiler-rt/test/
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135658
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw commented:
I don't see the necessity of using operand bundles. All of the possible
arguments are metadata strings, not SSA values.
Can't we just use metadata instead?
```
call float @llvm.nearbyint.f32(float %x), !fp.control !{ !"dyn"}, !fp.except !{
!"strict"}
```
@@ -0,0 +1,24 @@
+//===- llvm/IR/FloatingPointOps.def - FP intrinsics -*- 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: Apa
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135135
>From de6d895ebb26225db909f8506f77162f38a3f65f Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 11:09:45 +0800
Subject: [PATCH 1/4] [Clang][CodeGen][UBSan] Add more precise attributes to
reco
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/135602
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dtcxzyw wrote:
> > This patch adds support for GCC bound member functions extension:
> > https://gcc.gnu.org/onlinedocs/gcc/Bound-member-functions.html
> > Related issue: #22495 Closes #82727
>
> I think this requires an RFC justifying carrying the extension. It's a
> non-conforming extension
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only %s -verify
dtcxzyw wrote:
For reference: https://godbolt.org/z/Mf719b3en
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits
https://github.com/dtcxzyw ready_for_review
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 24ed3a2a46bf6aef3678a474eb4babd65baf551a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 16 Apr 2025 00:13:34 +0800
Subject: [PATCH] [Clang] Add support for GCC bound member functions extension
--
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 43c487cd6206a215542a7711b1e2b5c48e4d4ecb Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 16 Apr 2025 00:13:34 +0800
Subject: [PATCH] [Clang] Add support for GCC bound member functions extension
--
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 445c08bcb007f157f6c66c5fabb01c2aa88b3a89 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 22:58:44 +0800
Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/4] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 445c08bcb007f157f6c66c5fabb01c2aa88b3a89 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 22:58:44 +0800
Subject: [PATCH] [Clang] Add support for GCC bound member functions extension
--
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/7] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/6] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/5] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/3] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions
extensio
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 12:12:19 +0800
Subject: [PATCH] [Clang] Add support for GCC bound member functions extension
--
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135649
>From 6795a5143129520d2db343d768507174a70da453 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 01:24:10 +0800
Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions
extensio
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - |
FileCheck %s
+// RUN: %clang_cc1 %s -triple "spir-unknown-unknown"
-fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s
dtcxzyw wrote:
The default optimization lev
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/135649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/135649
None
>From 6795a5143129520d2db343d768507174a70da453 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Tue, 15 Apr 2025 01:24:10 +0800
Subject: [PATCH] [Clang] Add support for GCC bound member functions extensi
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/135602
Needed by https://github.com/llvm/llvm-project/pull/130742.
>From e58df222ea5a12e302094b4fc77b0e77cbbc3e60 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Mon, 14 Apr 2025 17:18:09 +0800
Subject: [PATCH] [C
https://github.com/dtcxzyw ready_for_review
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/135135
>From c0d8765b48fac979ab46eba4fd2cde85595c31e0 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 11:09:45 +0800
Subject: [PATCH 1/3] [Clang][CodeGen][UBSan] Add more precise attributes to
reco
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/130952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130952
>From 9a9c7cf2eff8c740789e9702a190af6dbd3f5014 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Wed, 12 Mar 2025 20:17:28 +0800
Subject: [PATCH 1/3] [Clang][CodeGen] Do not set inbounds in
`EmitMemberDataPoin
dtcxzyw wrote:
> Still not sure how https://github.com/llvm/llvm-project/pull/135141 is
> related.
We add a new parameter `bool &MayReadFromPtrToInt` to
`CodeGenFunction::EmitCheckValue`. If it is called outside
`CodeGenFunction::EmitCheck`, we have to pass the result into `EmitCheck` as
wel
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/130734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dtcxzyw created
https://github.com/llvm/llvm-project/pull/135130
Reverts llvm/llvm-project#130990
Breaks buildbot https://lab.llvm.org/buildbot/#/builders/186/builds/8072
>From 346c905e8ab7cb81c537eb5be1d57cc63a41daea Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu,
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130734
>From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 09:54:33 +0800
Subject: [PATCH 1/3] [Clang][CodeGen] Do not set inbounds flag for struct GEP
wi
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130952
>From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 09:54:33 +0800
Subject: [PATCH 1/5] [Clang][CodeGen] Do not set inbounds flag for struct GEP
wi
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130734
>From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 09:54:33 +0800
Subject: [PATCH 1/2] [Clang][CodeGen] Do not set inbounds flag for struct GEP
wi
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/130990
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -42,6 +42,11 @@ Potentially Breaking Changes
C/C++ Language Potentially Breaking Changes
---
+- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))``
are treated
dtcxzyw wrote:
Fixed.
https://g
dtcxzyw wrote:
Rebased on the top of https://github.com/llvm/llvm-project/pull/134269 and
https://github.com/llvm/llvm-project/pull/134221
https://github.com/llvm/llvm-project/pull/130734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130734
>From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 10 Apr 2025 09:54:33 +0800
Subject: [PATCH] [Clang][CodeGen] Do not set inbounds flag for struct GEP with
n
https://github.com/dtcxzyw closed
https://github.com/llvm/llvm-project/pull/134269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dtcxzyw wrote:
@efriedma-quic Any more comments?
https://github.com/llvm/llvm-project/pull/134269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10,3 +10,24 @@ void test(void) {
// DEFAULT: getelementptr inbounds nuw i32, ptr
// FWRAPV-POINTER: getelementptr i32, ptr
}
+
+struct S {
+ int a;
+ int b;
+ int c: 10;
dtcxzyw wrote:
Bitfields are handled by a different code path:
https://github.
@@ -42,6 +42,11 @@ Potentially Breaking Changes
C/C++ Language Potentially Breaking Changes
---
+- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))``
are treated
dtcxzyw wrote:
> then describes
dtcxzyw wrote:
> willreturn means we eliminate the call
The ubsan handler cannot be eliminated because `inaccessiblemem: readwrite`
indicates that it has externally observable side effects.
BTW, I just worry that some risky instructions (e.g., divided by zero) may be
moved before the handler
@@ -42,6 +42,11 @@ Potentially Breaking Changes
C/C++ Language Potentially Breaking Changes
---
+- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))``
are treated
dtcxzyw wrote:
I think it is jus
@@ -64,21 +64,27 @@ class CGBuilderTy : public CGBuilderBaseTy {
Address createConstGEP2_32(Address Addr, unsigned Idx0, unsigned Idx1,
const llvm::Twine &Name) {
const llvm::DataLayout &DL = BB->getDataLayout();
-llvm::GetElementPtrInst *
https://github.com/dtcxzyw updated
https://github.com/llvm/llvm-project/pull/130990
>From 48f8e2591c317f90eff6f1d0a4ecdf27e19a1b01 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng
Date: Thu, 13 Mar 2025 00:39:09 +0800
Subject: [PATCH 1/5] [Clang][CodeGen][UBSan] Add pre-commit tests. NFC.
---
cla
https://github.com/dtcxzyw edited
https://github.com/llvm/llvm-project/pull/130990
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dtcxzyw wrote:
> > most of them are safe
>
> What's the distinguishing factor here? Do you consider it "safe" to mark
> inbounds if the pointer is immediately dereferenced? Or does the pointer have
> to refer to a known successful allocation? Or something else?
Other calls to `CGBuilderTy::Cr
1 - 100 of 665 matches
Mail list logo