[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-29 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > How are you coming up w/ the target for your improvements? Is this something > other folks could try and try and find some inspiration? I ran the `SemaExpr.cpp` compilation command from the `compile_commands.json` through va

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/shafik commented: Very nice change. How are you coming up w/ the target for your improvements? Is this something other folks could try and try and find some inspiration? https://github.com/llvm/llvm-project/pull/141471 _

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1741,57 +1741,65 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) { + + const auto *E

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-27 Thread Mariya Podchishchaeva via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/Fznamznon approved this pull request. That looks great imo https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/141471 >From 7b0a2b83146623a1674967ff4353a9eea6efd25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 26 May 2025 12:19:22 +0200 Subject: [PAT

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: http://llvm-compile-time-tracker.com/compare.php?from=843e362318e884991e517a54446b4faeacdad789&to=7b0a2b83146623a1674967ff4353a9eea6efd25e&stat=instructions:u https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141471 Reorder the precondition checks to move the costly onces last. Also, only evaluate the RHS once to get the integral value. >From 7b0a2b83146623a1674967ff4353a9eea6efd25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Reorder the precondition checks to move the costly onces last. Also, only evaluate the RHS once to get the integral value. --- Full diff: https://github.com/llvm/llvm-project/pull/141471.diff 1 Files Affec