[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From f766ba7fdfef40adc304b3bd54ccf48db8288576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PATCH] Save FieldDecl BitWidth as a ConstantExpr ---

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: I was hoping that saving the value as an `unsigned` directly would give a little more speedup. `ConstantExpr` version: http://llvm-compile-time-tracker.com/compare.php?from=5a7b79c93e2e0c71aec016973f5f13d3bb2e7a62&to=a55efb0b221e7ea54b8f7c0e3f975c19a54e5796&stat=instructions:u

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread via cfe-commits
cor3ntin wrote: Wouldn't wrapping the value in a ConstantExpr achieve the same outcome? https://github.com/llvm/llvm-project/pull/117732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 6a1c51fd8b6b1d04294eaac65b261bedb451f22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 26 Nov 2024 13:10:33 +0100 Subject: [PATCH] [clang] Avoid re-evaluating field bitwidth ---

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang-codegen Author: Timm Baeder (tbaederr) Changes --- Patch is 35.40 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117732.diff 15 Files Affected: - (modified) clang/include/

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Patch is 35.40 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/117732.diff 15 Files Affected: - (modified) clang/include/clang/AST/Decl.h (+22-4) - (modif

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/117732 None >From d1d31ec6d00657786212660f657aac638366523f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 26 Nov 2024 13:10:33 +0100 Subject: [PATCH] [clang] Avoid re-evaluating field bitwidt