[clang] [llvm] [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (PR #135489)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` 
running on `sanitizer-buildbot7` while building `clang,llvm` at step 2 
"annotate".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/51/builds/14338


Here is the relevant piece of the build log for the reference

```
Step 2 (annotate) failure: 'python 
../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'
 (failure)
...
[182/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o
[183/186] Generating Msan-aarch64-with-call-Test
[184/186] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o
[185/186] Generating Msan-aarch64-Test
[185/186] Running compiler_rt regression tests
llvm-lit: 
/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276:
 warning: input 
'/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/interception/Unit'
 contained no tests
llvm-lit: 
/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:276:
 warning: input 
'/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/Unit'
 contained no tests
llvm-lit: 
/home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72:
 note: The test suite configuration requested an individual test timeout of 0 
seconds but a timeout of 900 seconds was requested on the command line. Forcing 
timeout to be 900 seconds.
-- Testing: 6025 tests, 72 workers --
Testing:  0.. 10.. 20.
FAIL: HWAddressSanitizer-aarch64 :: 
TestCases/hwasan_symbolize_stack_overflow.cpp (1595 of 6025)
 TEST 'HWAddressSanitizer-aarch64 :: 
TestCases/hwasan_symbolize_stack_overflow.cpp' FAILED 
Exit Code: 1

Command Output (stderr):
--
rm -rf 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp;
 mkdir 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp
 # RUN: at line 1
+ rm -rf 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp
+ mkdir 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp
/home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang
-Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   
-gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-globals 
-mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 
-mllvm -hwasan-instrument-personality-functions -Wl,--build-id -g 
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp
 -o 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow
 # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux/build/build_default/./bin/clang 
-Wthread-safety -Wthread-safety-reference -Wthread-safety-beta 
-gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mllvm -hwasan-globals 
-mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 
-mllvm -hwasan-instrument-personality-functions -Wl,--build-id -g 
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp
 -o 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow
env 
HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:symbolize=0
 not  
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow
 16 2>&1 | 
/home/b/sanitizer-aarch64-linux/build/build_default/bin/hwasan_symbolize 
--symbols 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp
 --index | FileCheck 
/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_overflow.cpp
 --check-prefixes=CHECK,AFTER0 # RUN: at line 3
+ env 
HWASAN_OPTIONS=disable_allocator_tagging=1:random_tags=0:fail_without_syscall_abi=0:symbolize=0
 not 
/home/b/sanitizer-aarch64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/hwasan/AARCH64/TestCases/Output/hwasan_symbolize_stack_overflow.cpp.tmp/hwasan_overflow
 16
+ /home/b/sanitizer-aarch64-linux/build/build_d

[clang] [llvm] [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (PR #135489)

2025-04-13 Thread via cfe-commits

llvmbot wrote:

/pull-request llvm/llvm-project#135577

https://github.com/llvm/llvm-project/pull/135489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building 
`clang` at step 4 "cmake stage 1".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/81/builds/6292


Here is the relevant piece of the build log for the reference

```
Step 4 (cmake stage 1) failure: 'cmake -G ...' (failure)
'cmake' is not recognized as an internal or external command,
operable program or batch file.

```



https://github.com/llvm/llvm-project/pull/129207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits


@@ -0,0 +1,34 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM-AND-OBJ %s
+
+# CHECK-ASM-AND-OBJ: lea.b.ze t0, t1, t3
+# CHECK-ASM: encoding: [0xdb,0x02,0xc3,0x11]
+nds.lea.b.ze t0, t1, t3
+
+# CHECK-ASM-AND-OBJ: lea.h.ze a0, a1, a3
+# CHECK-ASM: encoding: [0x5b,0x85,0xd5,0x12]
+nds.lea.h.ze a0, a1, a3
+
+# CHECK-ASM-AND-OBJ: lea.w.ze s0, s1, s3
+# CHECK-ASM: encoding: [0x5b,0x84,0x34,0x15]
+nds.lea.w.ze s0, s1, s3
+
+# CHECK-ASM-AND-OBJ: lea.d.ze a3, a4, a5
+# CHECK-ASM: encoding: [0xdb,0x06,0xf7,0x16]
+nds.lea.d.ze a3, a4, a5
+
+# CHECK-ASM-AND-OBJ: lwugp t0, 9568
+# CHECK-ASM: encoding: [0xab,0x62,0x04,0x56]
+nds.lwugp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: ldgp t0, -9568
+# CHECK-ASM: encoding: [0xab,0xb2,0x7b,0xaa]
+nds.ldgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: sdgp t0, 9568

kito-cheng wrote:

`nds.` prefix?

https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits


@@ -0,0 +1,105 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ32,CHECK-ASM-AND-OBJ 
%s
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ64,CHECK-ASM-AND-OBJ 
%s
+
+# CHECK-OBJ: nds.bbc a0, 16, 0x200
+# CHECK-ASM: nds.bbc a0, 16, 512
+# CHECK-ASM: encoding: [0x5b,0x70,0x05,0x21]
+nds.bbc a0, 16, 512
+
+# CHECK-OBJ32: nds.bbs a1, 21, 0xff04
+# CHECK-OBJ64: nds.bbs a1, 21, 0xff04
+# CHECK-ASM: nds.bbs a1, 21, -256
+# CHECK-ASM: encoding: [0x5b,0xf0,0x55,0xf1]
+nds.bbs a1, 21, -256
+
+# CHECK-OBJ: beqc t0, 23, 0x108
+# CHECK-ASM: beqc t0, 23, 256
+# CHECK-ASM: encoding: [0x5b,0xd0,0x72,0x11]
+nds.beqc t0, 23, 256
+
+# CHECK-OBJ32: bnec t1, 9, 0xff8c
+# CHECK-OBJ64: bnec t1, 9, 0xff8c
+# CHECK-ASM: bnec t1, 9, -128

kito-cheng wrote:

`nds.`

https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits


@@ -0,0 +1,105 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ32,CHECK-ASM-AND-OBJ 
%s
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ64,CHECK-ASM-AND-OBJ 
%s
+
+# CHECK-OBJ: nds.bbc a0, 16, 0x200
+# CHECK-ASM: nds.bbc a0, 16, 512
+# CHECK-ASM: encoding: [0x5b,0x70,0x05,0x21]
+nds.bbc a0, 16, 512
+
+# CHECK-OBJ32: nds.bbs a1, 21, 0xff04
+# CHECK-OBJ64: nds.bbs a1, 21, 0xff04
+# CHECK-ASM: nds.bbs a1, 21, -256
+# CHECK-ASM: encoding: [0x5b,0xf0,0x55,0xf1]
+nds.bbs a1, 21, -256
+
+# CHECK-OBJ: beqc t0, 23, 0x108
+# CHECK-ASM: beqc t0, 23, 256
+# CHECK-ASM: encoding: [0x5b,0xd0,0x72,0x11]
+nds.beqc t0, 23, 256
+
+# CHECK-OBJ32: bnec t1, 9, 0xff8c
+# CHECK-OBJ64: bnec t1, 9, 0xff8c
+# CHECK-ASM: bnec t1, 9, -128
+# CHECK-ASM: encoding: [0x5b,0x60,0x93,0xb8]
+nds.bnec t1, 9, -128
+
+# CHECK-ASM-AND-OBJ: bfoz a0, a1, 9, 13
+# CHECK-ASM: encoding: [0x5b,0xa5,0xd5,0x24]
+nds.bfoz a0, a1, 9, 13
+
+# CHECK-ASM-AND-OBJ: bfos t0, t1, 23, 3
+# CHECK-ASM: encoding: [0xdb,0x32,0x33,0x5c]
+nds.bfos t0, t1, 23, 3
+
+# CHECK-ASM-AND-OBJ: lea.h t0, t1, t3
+# CHECK-ASM: encoding: [0xdb,0x02,0xc3,0x0b]
+nds.lea.h t0, t1, t3
+
+# CHECK-ASM-AND-OBJ: lea.w a0, a1, a3
+# CHECK-ASM: encoding: [0x5b,0x85,0xd5,0x0c]
+nds.lea.w a0, a1, a3
+
+# CHECK-ASM-AND-OBJ: lea.d s0, s1, s3
+# CHECK-ASM: encoding: [0x5b,0x84,0x34,0x0f]
+nds.lea.d s0, s1, s3
+
+# CHECK-ASM-AND-OBJ: addigp t0, 9568
+# CHECK-ASM: encoding: [0x8b,0x12,0x04,0x56]
+nds.addigp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: lbgp t0, -9568
+# CHECK-ASM: encoding: [0x8b,0x82,0x1b,0xaa]
+nds.lbgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: lbugp t0, 9568
+# CHECK-ASM: encoding: [0x8b,0x22,0x04,0x56]
+nds.lbugp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: lhgp t0, -9568
+# CHECK-ASM: encoding: [0xab,0x92,0x1b,0xaa]
+nds.lhgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: lhugp t0, 9568
+# CHECK-ASM: encoding: [0xab,0x52,0x04,0x56]
+nds.lhugp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: lwgp t0, -9568
+# CHECK-ASM: encoding: [0xab,0xa2,0x3b,0xaa]
+nds.lwgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: sbgp t0, 9568
+# CHECK-ASM: encoding: [0x0b,0x30,0x54,0x56]
+nds.sbgp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: shgp t0, -9568
+# CHECK-ASM: encoding: [0xab,0x80,0x5b,0xaa]
+nds.shgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: swgp t0, 9568
+# CHECK-ASM: encoding: [0x2b,0x40,0x54,0x56]
+nds.swgp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: ffb t0, t1, t3
+# CHECK-ASM: encoding: [0xdb,0x02,0xc3,0x21]
+nds.ffb t0, t1, t3
+
+# CHECK-ASM-AND-OBJ: ffzmism a0, a1, a3
+# CHECK-ASM: encoding: [0x5b,0x85,0xd5,0x22]
+nds.ffzmism a0, a1, a3
+
+# CHECK-ASM-AND-OBJ: ffmism s0, s1, s3
+# CHECK-ASM: encoding: [0x5b,0x84,0x34,0x25]
+nds.ffmism s0, s1, s3
+
+# CHECK-ASM-AND-OBJ: flmism s0, s1, s3
+# CHECK-ASM: encoding: [0x5b,0x84,0x34,0x27]

kito-cheng wrote:

`nds.` prefix?

https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits


@@ -0,0 +1,105 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: llvm-mc %s -triple=riscv32 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ32,CHECK-ASM-AND-OBJ 
%s
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-OBJ64,CHECK-ASM-AND-OBJ 
%s
+
+# CHECK-OBJ: nds.bbc a0, 16, 0x200
+# CHECK-ASM: nds.bbc a0, 16, 512
+# CHECK-ASM: encoding: [0x5b,0x70,0x05,0x21]
+nds.bbc a0, 16, 512
+
+# CHECK-OBJ32: nds.bbs a1, 21, 0xff04
+# CHECK-OBJ64: nds.bbs a1, 21, 0xff04
+# CHECK-ASM: nds.bbs a1, 21, -256
+# CHECK-ASM: encoding: [0x5b,0xf0,0x55,0xf1]
+nds.bbs a1, 21, -256
+
+# CHECK-OBJ: beqc t0, 23, 0x108
+# CHECK-ASM: beqc t0, 23, 256

kito-cheng wrote:

`nds.`?

https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits


@@ -0,0 +1,34 @@
+# XAndesPerf - Andes Performance Extension
+# RUN: llvm-mc %s -triple=riscv64 -mattr=+xandesperf -show-encoding \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+xandesperf < %s \
+# RUN: | llvm-objdump --mattr=+xandesperf -M no-aliases --no-print-imm-hex 
-d -r - \
+# RUN: | FileCheck -check-prefixes=CHECK-ASM-AND-OBJ %s
+
+# CHECK-ASM-AND-OBJ: lea.b.ze t0, t1, t3
+# CHECK-ASM: encoding: [0xdb,0x02,0xc3,0x11]
+nds.lea.b.ze t0, t1, t3
+
+# CHECK-ASM-AND-OBJ: lea.h.ze a0, a1, a3
+# CHECK-ASM: encoding: [0x5b,0x85,0xd5,0x12]
+nds.lea.h.ze a0, a1, a3
+
+# CHECK-ASM-AND-OBJ: lea.w.ze s0, s1, s3
+# CHECK-ASM: encoding: [0x5b,0x84,0x34,0x15]
+nds.lea.w.ze s0, s1, s3
+
+# CHECK-ASM-AND-OBJ: lea.d.ze a3, a4, a5
+# CHECK-ASM: encoding: [0xdb,0x06,0xf7,0x16]
+nds.lea.d.ze a3, a4, a5
+
+# CHECK-ASM-AND-OBJ: lwugp t0, 9568
+# CHECK-ASM: encoding: [0xab,0x62,0x04,0x56]
+nds.lwugp t0, 0x2560
+
+# CHECK-ASM-AND-OBJ: ldgp t0, -9568
+# CHECK-ASM: encoding: [0xab,0xb2,0x7b,0xaa]
+nds.ldgp t0, -0x2560
+
+# CHECK-ASM-AND-OBJ: sdgp t0, 9568
+# CHECK-ASM: encoding: [0x2b,0x70,0x54,0x56]
+nds.sdgp t0, 0x2560

kito-cheng wrote:

`nds.` prefix seems not check in the `CHECK-ASM-AND-OBJ`?

https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-04-13 Thread YunQiang Su via cfe-commits

https://github.com/wzssyqa closed 
https://github.com/llvm/llvm-project/pull/129207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-13 Thread via cfe-commits

ShashwathiNavada wrote:

ping @cor3ntin

https://github.com/llvm/llvm-project/pull/125643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Kito Cheng via cfe-commits

https://github.com/kito-cheng edited 
https://github.com/llvm/llvm-project/pull/135110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-13 Thread Younan Zhang via cfe-commits


@@ -690,6 +690,23 @@ SmallVector 
TemplateParamsReferencedInTemplateArgumentList(
   SemaRef.MarkUsedTemplateParameters(
   DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams);
 
+  auto MarkDefaultArgs = [&](auto *Param) {
+if (!Param || !Param->hasDefaultArgument())
+  return;
+SemaRef.MarkUsedTemplateParameters(
+Param->getDefaultArgument().getArgument(),
+TemplateParamsList->getDepth(), ReferencedTemplateParams);
+  };
+
+  for (unsigned Index = 0; Index < TemplateParamsList->size(); ++Index) {
+if (!ReferencedTemplateParams[Index])
+  continue;
+auto *Param = TemplateParamsList->getParam(Index);
+MarkDefaultArgs(dyn_cast(Param));
+MarkDefaultArgs(dyn_cast(Param));
+MarkDefaultArgs(dyn_cast(Param));
+  }
+

zyn0217 wrote:

@mizvekov I looked into `ConvertDeducedTemplateArguments` and I'm afraid it 
won't help

In deduction guide synthesizing, we have a unique template parameter transform 
that does handle default parameters (which also covers non-alias deduction 
guide synthesizing) so when we find a parameter (e.g. `U` in example) used by 
the RHS (`A`), we form a new TTP on top of the TTP `U = T`. And, as `T` is 
not referenced by `A`, the declaration of which won't be created anyway, so 
we ended up with a problematic `template >` in 
the eventual CTAD guide.

```cpp
template  struct A {};

template 
using AA = A;
```

This is where the problem lies. And with `ConvertDeducedTemplateArguments`, 
which would substitute the default arguments with the deduced ones in 
non-rewrite mode, we end up building Subst* nodes that we never want in CTAD.

https://github.com/llvm/llvm-project/pull/134807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] Update LIBUNWIND_ENABLE_WERROR default value in BuildingLibunwind.rst (PR #135546)

2025-04-13 Thread via cfe-commits

github-actions[bot] wrote:



@firasuke Congratulations on having your first Pull Request (PR) merged into 
the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a 
problem with a build, you may receive a report in an email or a comment on this 
PR.

Please check whether problems have been caused by your change specifically, as 
the builds can include changes from many authors. It is not uncommon for your 
change to be included in a build that fails due to someone else's changes, or 
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself. This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/135546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] dd107b2 - Update LIBUNWIND_ENABLE_WERROR default value in BuildingLibunwind.rst (#135546)

2025-04-13 Thread via cfe-commits

Author: Firas Khalil Khana
Date: 2025-04-13T09:41:30-07:00
New Revision: dd107b20daedbc49dc3003ae2cb2e846267c308c

URL: 
https://github.com/llvm/llvm-project/commit/dd107b20daedbc49dc3003ae2cb2e846267c308c
DIFF: 
https://github.com/llvm/llvm-project/commit/dd107b20daedbc49dc3003ae2cb2e846267c308c.diff

LOG: Update LIBUNWIND_ENABLE_WERROR default value in BuildingLibunwind.rst 
(#135546)

`LIBUNWIND_ENABLE_WERROR` defaults to `OFF` according to
[CMakeLists.txt](https://github.com/llvm/llvm-project/blob/main/libunwind/CMakeLists.txt#L43).

Added: 


Modified: 
libunwind/docs/BuildingLibunwind.rst

Removed: 




diff  --git a/libunwind/docs/BuildingLibunwind.rst 
b/libunwind/docs/BuildingLibunwind.rst
index 8b4f1207d4ba9..c231587fd5022 100644
--- a/libunwind/docs/BuildingLibunwind.rst
+++ b/libunwind/docs/BuildingLibunwind.rst
@@ -91,7 +91,7 @@ libunwind specific options
 
 .. option:: LIBUNWIND_ENABLE_WERROR:BOOL
 
-  **Default**: ``ON``
+  **Default**: ``OFF``
 
   Compile with -Werror
 



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] Update LIBUNWIND_ENABLE_WERROR default value in BuildingLibunwind.rst (PR #135546)

2025-04-13 Thread Fangrui Song via cfe-commits

https://github.com/MaskRay closed 
https://github.com/llvm/llvm-project/pull/135546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

2025-04-13 Thread Matheus Izvekov via cfe-commits

https://github.com/mizvekov updated 
https://github.com/llvm/llvm-project/pull/135133

>From aaf5482c91f73431e1290cab640d01f4b3f39692 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov 
Date: Thu, 10 Apr 2025 02:52:36 -0300
Subject: [PATCH] [clang] implement printing of canonical expressions

This patch extends the canonicalization printing policy to cover expressions
and template names, and wires that up to the template argument printer,
covering expressions, and to the expression within a dependent decltype.

This is helpful for debugging, or if these expressions somehow end up
in diagnostics, as without this patch they can print as completely unrelated
expressions, which can be quite confusing.

This is because expressions are not uniqued, unlike types, and
when a template specialization containing an expression is the first to be
canonicalized, the expression ends up appearing in the canonical type of
subsequent equivalent specializations.

Fixes https://github.com/llvm/llvm-project/issues/92292
---
 .../StaticAccessedThroughInstanceCheck.cpp|2 +-
 .../clang-tidy/utils/Matchers.cpp |2 +-
 clang/include/clang/AST/PrettyPrinter.h   |6 +-
 clang/lib/AST/DeclPrinter.cpp |4 +-
 clang/lib/AST/JSONNodeDumper.cpp  |2 +
 clang/lib/AST/StmtPrinter.cpp |6 +-
 clang/lib/AST/TemplateBase.cpp|7 +-
 clang/lib/AST/TemplateName.cpp|   10 +-
 clang/lib/AST/TextNodeDumper.cpp  |2 +
 clang/lib/AST/TypePrinter.cpp |   16 +-
 clang/lib/CodeGen/CGDebugInfo.cpp |2 +-
 clang/lib/Sema/SemaTemplate.cpp   |2 +-
 clang/test/AST/ast-dump-templates.cpp | 1022 +
 .../test/CXX/temp/temp.decls/temp.mem/p5.cpp  |   17 +
 clang/unittests/AST/TypePrinterTest.cpp   |2 +-
 15 files changed, 1080 insertions(+), 22 deletions(-)

diff --git 
a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
 
b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
index 08adc7134cfea..fffb136e5a332 100644
--- 
a/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
+++ 
b/clang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
@@ -69,7 +69,7 @@ void StaticAccessedThroughInstanceCheck::check(
   PrintingPolicyWithSuppressedTag.SuppressTagKeyword = true;
   PrintingPolicyWithSuppressedTag.SuppressUnwrittenScope = true;
 
-  PrintingPolicyWithSuppressedTag.PrintCanonicalTypes =
+  PrintingPolicyWithSuppressedTag.PrintAsCanonical =
   !BaseExpr->getType()->isTypedefNameType();
 
   std::string BaseTypeName =
diff --git a/clang-tools-extra/clang-tidy/utils/Matchers.cpp 
b/clang-tools-extra/clang-tidy/utils/Matchers.cpp
index 742dc6fda8c92..4974a9cdb9f4b 100644
--- a/clang-tools-extra/clang-tidy/utils/Matchers.cpp
+++ b/clang-tools-extra/clang-tidy/utils/Matchers.cpp
@@ -33,7 +33,7 @@ bool MatchesAnyListedTypeNameMatcher::matches(
 
   PrintingPolicy PrintingPolicyWithSuppressedTag(
   Finder->getASTContext().getLangOpts());
-  PrintingPolicyWithSuppressedTag.PrintCanonicalTypes = CanonicalTypes;
+  PrintingPolicyWithSuppressedTag.PrintAsCanonical = CanonicalTypes;
   PrintingPolicyWithSuppressedTag.SuppressElaboration = true;
   PrintingPolicyWithSuppressedTag.SuppressScope = false;
   PrintingPolicyWithSuppressedTag.SuppressTagKeyword = true;
diff --git a/clang/include/clang/AST/PrettyPrinter.h 
b/clang/include/clang/AST/PrettyPrinter.h
index 91818776b770c..5a98ae1987b16 100644
--- a/clang/include/clang/AST/PrettyPrinter.h
+++ b/clang/include/clang/AST/PrettyPrinter.h
@@ -76,7 +76,7 @@ struct PrintingPolicy {
 MSWChar(LO.MicrosoftExt && !LO.WChar), IncludeNewlines(true),
 MSVCFormatting(false), ConstantsAsWritten(false),
 SuppressImplicitBase(false), FullyQualifiedName(false),
-PrintCanonicalTypes(false), PrintInjectedClassNameWithArguments(true),
+PrintAsCanonical(false), PrintInjectedClassNameWithArguments(true),
 UsePreferredNames(true), AlwaysIncludeTypeForTemplateArgument(false),
 CleanUglifiedParameters(false), EntireContentsOfLargeArray(true),
 UseEnumerators(true), UseHLSLTypes(LO.HLSL) {}
@@ -310,9 +310,9 @@ struct PrintingPolicy {
   LLVM_PREFERRED_TYPE(bool)
   unsigned FullyQualifiedName : 1;
 
-  /// Whether to print types as written or canonically.
+  /// Whether to print entities as written or canonically.
   LLVM_PREFERRED_TYPE(bool)
-  unsigned PrintCanonicalTypes : 1;
+  unsigned PrintAsCanonical : 1;
 
   /// Whether to print an InjectedClassNameType with template arguments or as
   /// written. When a template argument is unnamed, printing it results in
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 28098b242d494..22da5bf251ecd 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -735,7 +735,7

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-13 Thread Owen Pan via cfe-commits

owenca wrote:

We should stick to the table in 
https://github.com/llvm/llvm-project/pull/134337#discussion_r2028339995 and 
deprecate `SFS_InlineOnly`, `SFS_Empty`, and `SFS_Inline`.

https://github.com/llvm/llvm-project/pull/134337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][bytecode] Reject constexpr-unknown pointers from Inc ops (PR #135548)

2025-04-13 Thread Timm Baeder via cfe-commits

https://github.com/tbaederr closed 
https://github.com/llvm/llvm-project/pull/135548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] Update LIBUNWIND_ENABLE_WERROR default value in BuildingLibunwind.rst (PR #135546)

2025-04-13 Thread Fangrui Song via cfe-commits

https://github.com/MaskRay approved this pull request.


https://github.com/llvm/llvm-project/pull/135546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][bytecode] Reject constexpr-unknown pointers from Inc ops (PR #135548)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-x86_64-windows` 
running on `minipc-ryzen-win` while building `clang` at step 6 
"build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/166/builds/952


Here is the relevant piece of the build log for the reference

```
Step 6 (build-unified-tree) failure: build (failure)
...
39.742 [116/12/22] Linking CXX executable bin\sancov.exe
39.778 [115/12/23] Linking CXX executable bin\sanstats.exe
39.819 [114/12/24] Linking CXX executable bin\llvm-xray.exe
39.821 [113/12/25] Linking CXX executable bin\obj2yaml.exe
39.841 [112/12/26] Generating ../../bin/llvm-dlltool.exe
41.429 [111/12/27] Linking CXX executable bin\llvm-objcopy.exe
41.938 [110/12/28] Linking CXX executable bin\llvm-dwarfdump.exe
43.870 [109/12/29] Linking CXX executable bin\llvm-readobj.exe
44.419 [108/12/30] Linking CXX executable bin\llvm-ctxprof-util.exe
45.339 [107/12/31] Linking CXX executable bin\mlir-opt.exe
FAILED: bin/mlir-opt.exe 
C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" 
-E vs_link_exe --msvc-ver=1943 
--intdir=tools\mlir\tools\mlir-opt\CMakeFiles\mlir-opt.dir 
--rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe 
--mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- 
C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe
 /nologo @CMakeFiles\mlir-opt.rsp  /out:bin\mlir-opt.exe 
/implib:lib\mlir-opt.lib /pdb:bin\mlir-opt.pdb /version:0.0 /machine:x64 
/STACK:1000 /INCREMENTAL:NO /subsystem:console && cd ."
LINK: command 
"C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe
 /nologo @CMakeFiles\mlir-opt.rsp /out:bin\mlir-opt.exe 
/implib:lib\mlir-opt.lib /pdb:bin\mlir-opt.pdb /version:0.0 /machine:x64 
/STACK:1000 /INCREMENTAL:NO /subsystem:console /MANIFEST:EMBED,ID=1" failed 
(exit code 0) with the following output:

  Version 14.43.34809.0

  ExceptionCode= C005
  ExceptionFlags   = 
  ExceptionAddress = 7FF658EE36A2 (7FF658EC) 
"C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe"
  NumberParameters = 0002
  ExceptionInformation[ 0] = 0
  ExceptionInformation[ 1] = 

CONTEXT:
  Rax= 2A6DC610340  R8 = 4
  Rbx= AAAB  R9 = 0
  Rcx= 2C9  R10= 2A6DD160138
  Rdx= 2A6D6909630  R11= C1
  Rsp= DDD3BFBF40  R12= 0
  Rbp= DDD3BFC040  E13= 2A6DECFAB00

  Rsi= A64E  R14= 3A64

  Rdi= 2000  R15= 2A6DFD9F478

  Rip= 7FF658EE36A2  EFlags = 10206

  SegCs  = 33  SegDs  = 2B

  SegSs  = 2B  SegEs  = 2B

  SegFs  = 53  SegGs  = 2B

  Dr0= 0  Dr3= 0

  Dr1= 0  Dr6= 0

  Dr2= 0  Dr7= 0


```



https://github.com/llvm/llvm-project/pull/135548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 974bda8 - [clang][bytecode] Reject constexpr-unknown pointers from Inc ops (#135548)

2025-04-13 Thread via cfe-commits

Author: Timm Baeder
Date: 2025-04-13T18:57:55+02:00
New Revision: 974bda8f61e056f90b17baa6db686c91d20ebe9d

URL: 
https://github.com/llvm/llvm-project/commit/974bda8f61e056f90b17baa6db686c91d20ebe9d
DIFF: 
https://github.com/llvm/llvm-project/commit/974bda8f61e056f90b17baa6db686c91d20ebe9d.diff

LOG: [clang][bytecode] Reject constexpr-unknown pointers from Inc ops (#135548)

We used to accept c++ as a known value here, causing wrong codegen.

Added: 


Modified: 
clang/lib/AST/ByteCode/Interp.cpp
clang/lib/AST/ByteCode/Interp.h
clang/test/AST/ByteCode/codegen.cpp

Removed: 




diff  --git a/clang/lib/AST/ByteCode/Interp.cpp 
b/clang/lib/AST/ByteCode/Interp.cpp
index 0afd772c73b85..3e1f36da8925f 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -307,7 +307,7 @@ bool isConstexprUnknown(const Pointer &P) {
   if (P.isDummy())
 return false;
   const VarDecl *VD = P.block()->getDescriptor()->asVarDecl();
-  return VD && VD->hasLocalStorage();
+  return VD && VD->hasLocalStorage() && !isa(VD);
 }
 
 bool CheckBCPResult(InterpState &S, const Pointer &Ptr) {

diff  --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index 4e84dcc8d551d..b4e15b3ffbe68 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -771,6 +771,11 @@ bool IncDecHelper(InterpState &S, CodePtr OpPC, const 
Pointer &Ptr,
   bool CanOverflow) {
   assert(!Ptr.isDummy());
 
+  if (!S.inConstantContext()) {
+if (isConstexprUnknown(Ptr))
+  return false;
+  }
+
   if constexpr (std::is_same_v) {
 if (!S.getLangOpts().CPlusPlus14)
   return Invalid(S, OpPC);

diff  --git a/clang/test/AST/ByteCode/codegen.cpp 
b/clang/test/AST/ByteCode/codegen.cpp
index ea2c812f30f6f..7c853a20362b8 100644
--- a/clang/test/AST/ByteCode/codegen.cpp
+++ b/clang/test/AST/ByteCode/codegen.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s 
| FileCheck %s
 // RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s 
-fexperimental-new-constant-interpreter | FileCheck %s
 
 #ifdef __SIZEOF_INT128__
@@ -95,3 +95,12 @@ void f(A *a) {
   // CHECK: call void @_ZN1AD1Ev(
   A::E e3 = A().Foo;
 }
+
+int notdead() {
+  auto l = [c=0]() mutable {
+return  c++ < 5 ? 10 : 12;
+  };
+  return l();
+}
+// CHECK: _ZZ7notdeadvEN3$_0clEv
+// CHECK: ret i32 %cond



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (PR #135489)

2025-04-13 Thread Phoebe Wang via cfe-commits

https://github.com/phoebewang milestoned 
https://github.com/llvm/llvm-project/pull/135489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-13 Thread via cfe-commits

https://github.com/irymarchyk updated 
https://github.com/llvm/llvm-project/pull/134337

>From df25a8bbfd827085265c51a44bedbf38deebbab4 Mon Sep 17 00:00:00 2001
From: Ivan Rymarchyk <>
Date: Sat, 29 Mar 2025 13:54:32 -0700
Subject: [PATCH 1/6] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add
 new AllowShortFunctionsOnASingleLineOptions for granular setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The current clang-format configuration option AllowShortFunctionsOnASingleLine 
uses a single enum (ShortFunctionStyle) to control when short function 
definitions can be merged onto a single line. This enum provides predefined 
combinations of conditions (e.g., None, Empty only, Inline only, Inline 
including Empty, All).

This approach has limitations:

1. **Lack of Granularity:** Users cannot specify arbitrary combinations of 
conditions. For example, a user might want to allow merging for both empty 
functions and short top-level functions, but not for short functions defined 
within classes. This is not possible with the current enum options except by 
choosing All, which might merge more than desired.

2. **Inflexibility:** Adding new conditions for merging (e.g., distinguishing 
between member functions and constructors, handling lambdas specifically) would 
require adding many new combined enum values, leading to a combinatorial 
explosion and making the configuration complex.

3. **Implicit Behavior:** Some options imply others (e.g., Inline implies 
Empty), which might not always be intuitive or desired.

The goal is to replace this single-choice enum with a more flexible mechanism 
allowing users to specify a set of conditions that must be met for a short 
function to be merged onto a single line.

**Proposed Solution**

1. Introduce a new configuration option: AllowShortFunctionsOnSingleLineOptions.

2. This option will accept a list of strings, where each string represents a 
specific condition allowing merging.

3. **Backward Compatibility:**

- If AllowShortFunctionsOnSingleLineOptions is present in the 
configuration, it takes precedence.

- If AllowShortFunctionsOnSingleLineOptions is not present, but the old 
AllowShortFunctionsOnASingleLine is present, the old option should be parsed 
and mapped to the corresponding new semantics for compatibility.
---
 clang/docs/ClangFormatStyleOptions.rst  |  64 +++
 clang/include/clang/Format/Format.h |  70 
 clang/lib/Format/Format.cpp |  52 +
 clang/lib/Format/TokenAnnotator.cpp |   7 +-
 clang/lib/Format/UnwrappedLineFormatter.cpp |   9 +-
 clang/unittests/Format/ConfigParseTest.cpp  |   6 ++
 clang/unittests/Format/FormatTest.cpp   | 111 
 7 files changed, 310 insertions(+), 9 deletions(-)

diff --git a/clang/docs/ClangFormatStyleOptions.rst 
b/clang/docs/ClangFormatStyleOptions.rst
index 9ecac68ae72bf..167701cf6585d 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -1959,6 +1959,70 @@ the configuration (without a prefix: ``Auto``).
   };
   void f() { bar(); }
 
+  * ``SFS_Custom`` (in configuration: ``Custom``)
+Configure merge behavior using AllowShortFunctionsOnASingleLineOptions
+
+
+
+.. _AllowShortFunctionsOnASingleLineOptions:
+
+**AllowShortFunctionsOnASingleLineOptions** (``ShortFunctionMergeFlags``) 
:versionbadge:`clang-format 21` :ref:`¶ 
`
+  Precise control over merging short functions
+
+  If ``AllowShortFunctionsOnASingleLine`` is set to ``Custom``, use this to
+  specify behavior in different situations.
+
+  .. code-block:: yaml
+
+# Example of usage:
+AllowShortFunctionsOnASingleLine: Custom
+AllowShortFunctionsOnASingleLineOptions:
+  Empty: false
+  Inline: true
+  All: false
+
+  Nested configuration flags:
+
+  Precise control over merging short functions
+
+  .. code-block:: c++
+
+# Should be declared this way:
+AllowShortFunctionsOnASingleLine: Custom
+AllowShortFunctionsOnASingleLineOptions:
+  Empty: false
+  Inline: true
+  All: false
+
+  * ``bool Empty`` Only merge empty functions.
+
+.. code-block:: c++
+
+  void f() {}
+  void f2() {
+bar2();
+  }
+
+  * ``bool Inline`` Only merge functions defined inside a class.
+
+.. code-block:: c++
+
+  class Foo {
+void f() { foo(); }
+  };
+  void f() {
+foo();
+  }
+  void f() {}
+
+  * ``bool All`` Merge all functions fitting on a single line.
+
+.. code-block:: c++
+
+  class Foo {
+void f() { foo(); }
+  };
+  void f() { bar(); }
 
 
 .. _AllowShortIfStatementsOnASingleLine:
diff --git a/clang/include/clang/Format/Format.h 
b/clang/include/clang/Format/Format.h
index fec47a248abb4..96b1ecab04e63 100644
--- a/clang/include/clang/Format/Format.h
+++ b/clang/include/clang/Format/Format.h
@@ -871,6 +871,8 @@ struct FormatStyle {
 /

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-13 Thread via cfe-commits

irymarchyk wrote:

> We should stick to the table in [#134337 
> (comment)](https://github.com/llvm/llvm-project/pull/134337#discussion_r2028339995)
>  and deprecate `SFS_InlineOnly`, `SFS_Empty`, and `SFS_Inline`.

Thanks, I marked options as 'deprecated'. Mapping is done in Format.cpp.

https://github.com/llvm/llvm-project/pull/134337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libunwind][Haiku] Fix signal frame unwinding (PR #135367)

2025-04-13 Thread via cfe-commits


@@ -3032,6 +2983,162 @@ int UnwindCursor::stepThroughSigReturn(Registers_s390x &) {
 #endif // defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) &&
// defined(_LIBUNWIND_TARGET_S390X)
 
+#if defined(_LIBUNWIND_CHECK_HAIKU_SIGRETURN)
+
+#if defined(B_HAIKU_32_BIT)
+typedef Elf32_Sym elf_sym;
+#define ELF_ST_TYPE ELF32_ST_TYPE
+#elif defined(B_HAIKU_64_BIT)
+typedef Elf64_Sym elf_sym;
+#define ELF_ST_TYPE ELF64_ST_TYPE
+#endif
+
+// Private syscall declared as a weak symbol to prevent ABI breaks.
+extern "C" status_t __attribute__((weak))
+_kern_read_kernel_image_symbols(image_id id, elf_sym *symbolTable,
+int32 *_symbolCount, char *stringTable,
+size_t *_stringTableSize, addr_t *_imageDelta);
+
+static addr_t signalHandlerBegin = 0;
+static addr_t signalHandlerEnd = 0;
+
+template 
+bool UnwindCursor::setInfoForSigReturn() {
+  if (signalHandlerBegin == 0) {
+// If we do not have the addresses yet, find them now.
+
+// Determine if the private function is there and usable.
+if (_kern_read_kernel_image_symbols == nullptr) {
+  signalHandlerBegin = (addr_t)-1;
+  return false;
+}
+
+// Get the system commpage and enumerate its symbols.
+image_id commpageImage = -1;
+image_info info;
+int32 cookie = 0;
+while (get_next_image_info(B_SYSTEM_TEAM, &cookie, &info) == B_OK) {

waddlesplash wrote:

It appears GNU libunwind does. FreeBSD at least has a similar setup to Linux 
with a different magic number.

If what's going on here is just that the signal handler trampoline and its size 
need to be found, perhaps we can make it properly enumerable by 
`dl_iterate_phdr`? That may be more work but will probably be more portable too?

https://github.com/llvm/llvm-project/pull/135367
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-04-13 Thread YunQiang Su via cfe-commits

https://github.com/wzssyqa updated 
https://github.com/llvm/llvm-project/pull/129207

>From 679f92557d62acd87bf521050db7c2aee527293a Mon Sep 17 00:00:00 2001
From: YunQiang Su 
Date: Fri, 28 Feb 2025 16:09:04 +0800
Subject: [PATCH 1/6] Clang: Add minnum/maxnum builtin functions support

With https://github.com/llvm/llvm-project/pull/112852, we claimed
that llvm.minnum and llvm.maxnum should treat +0.0>-0.0,
while libc doesn't require fmin(3)/fmax(3) for it.

To make llvm.minnum/llvm.maxnum easy to use, we define the builtin
functions for them, include
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_elementwise_minnum
__builtin_minnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum
__builtin_elementwise_maxnum
__builtin_maxnum

All of them support _Float16, float, double, long double.
---
 clang/include/clang/Basic/Builtins.td  |  24 ++
 clang/include/clang/Sema/Sema.h|   1 +
 clang/lib/CodeGen/CGBuiltin.cpp|  26 ++
 clang/lib/Sema/SemaChecking.cpp|  45 
 clang/test/CodeGen/builtin-maxnum-minnum.c | 269 +
 5 files changed, 365 insertions(+)
 create mode 100644 clang/test/CodeGen/builtin-maxnum-minnum.c

diff --git a/clang/include/clang/Basic/Builtins.td 
b/clang/include/clang/Basic/Builtins.td
index 868e5b92acdc9..3afc4ac15b43f 100644
--- a/clang/include/clang/Basic/Builtins.td
+++ b/clang/include/clang/Basic/Builtins.td
@@ -209,6 +209,18 @@ def FmaxF16F128 : Builtin, F16F128MathTemplate {
   let Prototype = "T(T, T)";
 }
 
+def MinNum : Builtin {
+  let Spellings = ["__builtin_minnum"];
+  let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Const, 
CustomTypeChecking, Constexpr];
+  let Prototype = "void(...)";
+}
+
+def MaxNum : Builtin {
+  let Spellings = ["__builtin_maxnum"];
+  let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Const, 
CustomTypeChecking, Constexpr];
+  let Prototype = "void(...)";
+}
+
 def FminF16F128 : Builtin, F16F128MathTemplate {
   let Spellings = ["__builtin_fmin"];
   let Attributes = [FunctionWithBuiltinPrefix, NoThrow, Const, Constexpr];
@@ -1304,6 +1316,18 @@ def ElementwiseMin : Builtin {
   let Prototype = "void(...)";
 }
 
+def ElementwiseMaxNum : Builtin {
+  let Spellings = ["__builtin_elementwise_maxnum"];
+  let Attributes = [NoThrow, Const, CustomTypeChecking];
+  let Prototype = "void(...)";
+}
+
+def ElementwiseMinNum : Builtin {
+  let Spellings = ["__builtin_elementwise_minnum"];
+  let Attributes = [NoThrow, Const, CustomTypeChecking];
+  let Prototype = "void(...)";
+}
+
 def ElementwiseMaximum : Builtin {
   let Spellings = ["__builtin_elementwise_maximum"];
   let Attributes = [NoThrow, Const, CustomTypeChecking];
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 0595e3dff3bb9..06daa5304ec21 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -2597,6 +2597,7 @@ class Sema final : public SemaBase {
   ExprResult AtomicOpsOverloaded(ExprResult TheCallResult,
  AtomicExpr::AtomicOp Op);
 
+  bool BuiltinMaxNumMinNumMath(CallExpr *TheCall);
   /// \param FPOnly restricts the arguments to floating-point types.
   bool BuiltinElementwiseMath(CallExpr *TheCall,
   EltwiseBuiltinArgTyRestriction ArgTyRestr =
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index fe55dfffc1cbe..15f6bcded5e4c 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -2629,6 +2629,16 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl 
GD, unsigned BuiltinID,
Intrinsic::minnum,

Intrinsic::experimental_constrained_minnum));
 
+case Builtin::BI__builtin_maxnum:
+  return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(
+  *this, E, Intrinsic::maxnum,
+  Intrinsic::experimental_constrained_maxnum));
+
+case Builtin::BI__builtin_minnum:
+  return RValue::get(emitBinaryMaybeConstrainedFPBuiltin(
+  *this, E, Intrinsic::minnum,
+  Intrinsic::experimental_constrained_minnum));
+
 case Builtin::BIfmaximum_num:
 case Builtin::BIfmaximum_numf:
 case Builtin::BIfmaximum_numl:
@@ -3818,6 +3828,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl 
GD, unsigned BuiltinID,
 return RValue::get(Result);
   }
 
+  case Builtin::BI__builtin_elementwise_maxnum: {
+Value *Op0 = EmitScalarExpr(E->getArg(0));
+Value *Op1 = EmitScalarExpr(E->getArg(1));
+Value *Result = Builder.CreateBinaryIntrinsic(llvm::Intrinsic::maxnum, Op0,
+  Op1, nullptr, "elt.maxnum");
+return RValue::get(Result);
+  }
+
+  case Builtin::BI__builtin_elementwise_minnum: {
+Value 

[libunwind] [libunwind][Haiku] Fix signal frame unwinding (PR #135367)

2025-04-13 Thread Trung Nguyen via cfe-commits


@@ -3032,6 +2983,162 @@ int UnwindCursor::stepThroughSigReturn(Registers_s390x &) {
 #endif // defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) &&
// defined(_LIBUNWIND_TARGET_S390X)
 
+#if defined(_LIBUNWIND_CHECK_HAIKU_SIGRETURN)
+
+#if defined(B_HAIKU_32_BIT)
+typedef Elf32_Sym elf_sym;
+#define ELF_ST_TYPE ELF32_ST_TYPE
+#elif defined(B_HAIKU_64_BIT)
+typedef Elf64_Sym elf_sym;
+#define ELF_ST_TYPE ELF64_ST_TYPE
+#endif
+
+// Private syscall declared as a weak symbol to prevent ABI breaks.
+extern "C" status_t __attribute__((weak))
+_kern_read_kernel_image_symbols(image_id id, elf_sym *symbolTable,
+int32 *_symbolCount, char *stringTable,
+size_t *_stringTableSize, addr_t *_imageDelta);
+
+static addr_t signalHandlerBegin = 0;
+static addr_t signalHandlerEnd = 0;
+
+template 
+bool UnwindCursor::setInfoForSigReturn() {
+  if (signalHandlerBegin == 0) {
+// If we do not have the addresses yet, find them now.
+
+// Determine if the private function is there and usable.
+if (_kern_read_kernel_image_symbols == nullptr) {
+  signalHandlerBegin = (addr_t)-1;
+  return false;
+}
+
+// Get the system commpage and enumerate its symbols.
+image_id commpageImage = -1;
+image_info info;
+int32 cookie = 0;
+while (get_next_image_info(B_SYSTEM_TEAM, &cookie, &info) == B_OK) {

trungnt2910 wrote:

`dl_iterate_phdr` iterates through _program headers_, which the `commpage` does 
not seem to have.

See also:
https://github.com/haiku/haiku/blob/a1e94e45fc773750e0d106532299bf6da8d0e513/src/libs/bsd/dl_iterate_phdr.c#L43-L47

https://github.com/llvm/llvm-project/pull/135367
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libunwind][Haiku] Fix signal frame unwinding (PR #135367)

2025-04-13 Thread via cfe-commits


@@ -3032,6 +2983,162 @@ int UnwindCursor::stepThroughSigReturn(Registers_s390x &) {
 #endif // defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) &&
// defined(_LIBUNWIND_TARGET_S390X)
 
+#if defined(_LIBUNWIND_CHECK_HAIKU_SIGRETURN)
+
+#if defined(B_HAIKU_32_BIT)
+typedef Elf32_Sym elf_sym;
+#define ELF_ST_TYPE ELF32_ST_TYPE
+#elif defined(B_HAIKU_64_BIT)
+typedef Elf64_Sym elf_sym;
+#define ELF_ST_TYPE ELF64_ST_TYPE
+#endif
+
+// Private syscall declared as a weak symbol to prevent ABI breaks.
+extern "C" status_t __attribute__((weak))
+_kern_read_kernel_image_symbols(image_id id, elf_sym *symbolTable,
+int32 *_symbolCount, char *stringTable,
+size_t *_stringTableSize, addr_t *_imageDelta);
+
+static addr_t signalHandlerBegin = 0;
+static addr_t signalHandlerEnd = 0;
+
+template 
+bool UnwindCursor::setInfoForSigReturn() {
+  if (signalHandlerBegin == 0) {
+// If we do not have the addresses yet, find them now.
+
+// Determine if the private function is there and usable.
+if (_kern_read_kernel_image_symbols == nullptr) {
+  signalHandlerBegin = (addr_t)-1;
+  return false;
+}
+
+// Get the system commpage and enumerate its symbols.
+image_id commpageImage = -1;
+image_info info;
+int32 cookie = 0;
+while (get_next_image_info(B_SYSTEM_TEAM, &cookie, &info) == B_OK) {

waddlesplash wrote:

Yes, and my suggestion here is that we find a way to change this, and give the 
commpage an ELF header.

https://github.com/llvm/llvm-project/pull/135367
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-13 Thread Urvi Rav via cfe-commits


@@ -2759,6 +2759,19 @@ StmtResult 
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
   OpenMPClauseKind CKind = Tok.isAnnotation()
? OMPC_unknown
: getOpenMPClauseKind(PP.getSpelling(Tok));
+  // Check if the clause is unrecognized.
+  if (getLangOpts().OpenMP < 52 &&
+  (CKind == OMPC_unknown || CKind == OMPC_otherwise)) {
+Diag(Tok, diag::err_omp_unknown_clause)
+<< PP.getSpelling(Tok) << "metadirective";
+  }
+  if (getLangOpts().OpenMP >= 52 && CKind == OMPC_unknown) {
+Diag(Tok, diag::err_omp_unknown_clause)
+<< PP.getSpelling(Tok) << "metadirective";
+  }

ravurvi20 wrote:

ping @kparzysz 

https://github.com/llvm/llvm-project/pull/128640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] e57f4e8 - [RISCV][NFC] Make generated intrinsic records more human-readable (#133710)

2025-04-13 Thread Wang Pengcheng via cfe-commits

Author: Pengcheng Wang
Date: 2025-04-14T13:00:57+08:00
New Revision: e57f4e8969db32f075d8f3e554506ec8b187a2f1

URL: 
https://github.com/llvm/llvm-project/commit/e57f4e8969db32f075d8f3e554506ec8b187a2f1
DIFF: 
https://github.com/llvm/llvm-project/commit/e57f4e8969db32f075d8f3e554506ec8b187a2f1.diff

LOG: [RISCV][NFC] Make generated intrinsic records more human-readable (#133710)

We add comment markers and print enum names instead of numbers.

For required extensions, we print the feature list instead of raw
bits.

This recommits d0cf5cd which was reverted by 21ff45d.

Added: 


Modified: 
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/Sema/SemaRISCV.cpp
clang/lib/Support/RISCVVIntrinsicUtils.cpp
clang/utils/TableGen/RISCVVEmitter.cpp

Removed: 




diff  --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h 
b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index 8f2a4f54a1b7f..00a79a0fcb5d9 100644
--- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -11,6 +11,7 @@
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/BitmaskEnum.h"
+#include "llvm/ADT/Bitset.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include 
@@ -376,6 +377,8 @@ enum PolicyScheme : uint8_t {
   HasPolicyOperand,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS);
+
 // TODO refactor RVVIntrinsic class design after support all intrinsic
 // combination. This represents an instantiation of an intrinsic with a
 // particular type and prototype
@@ -507,6 +510,23 @@ enum RVVRequire {
   RVV_REQ_NUM,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require);
+
+struct RequiredExtensionBits {
+  llvm::Bitset Bits;
+  RequiredExtensionBits() {}
+  RequiredExtensionBits(std::initializer_list Init) {
+for (auto I : Init)
+  Bits.set(I);
+  }
+
+  void set(unsigned I) { Bits.set(I); }
+  bool operator[](unsigned I) const { return Bits[I]; }
+};
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+  const RequiredExtensionBits &Exts);
+
 // Raw RVV intrinsic info, used to expand later.
 // This struct is highly compact for minimized code size.
 struct RVVIntrinsicRecord {
@@ -518,7 +538,7 @@ struct RVVIntrinsicRecord {
   const char *OverloadedName;
 
   // Required target features for this intrinsic.
-  uint32_t RequiredExtensions[(RVV_REQ_NUM + 31) / 32];
+  RequiredExtensionBits RequiredExtensions;
 
   // Prototype for this intrinsic, index of RVVSignatureTable.
   uint16_t PrototypeIndex;

diff  --git a/clang/lib/Sema/SemaRISCV.cpp b/clang/lib/Sema/SemaRISCV.cpp
index 746609604d1ba..b9f843b1920a1 100644
--- a/clang/lib/Sema/SemaRISCV.cpp
+++ b/clang/lib/Sema/SemaRISCV.cpp
@@ -232,8 +232,7 @@ void RISCVIntrinsicManagerImpl::ConstructRVVIntrinsics(
   for (auto &Record : Recs) {
 // Check requirements.
 if (llvm::any_of(FeatureCheckList, [&](const auto &Item) {
-  return ((Record.RequiredExtensions[Item.second / 32] &
-   (1U << (Item.second % 32))) != 0) &&
+  return Record.RequiredExtensions[Item.second] &&
  !TI.hasFeature(Item.first);
 }))
   continue;

diff  --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp 
b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index e44fbb0181830..6378596ef31e2 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -1196,36 +1196,91 @@ SmallVector 
parsePrototypes(StringRef Prototypes) {
   return PrototypeDescriptors;
 }
 
+#define STRINGIFY(NAME)
\
+  case NAME:   
\
+OS << #NAME;   
\
+break;
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS) {
+  switch (PS) {
+STRINGIFY(SchemeNone)
+STRINGIFY(HasPassthruOperand)
+STRINGIFY(HasPolicyOperand)
+  }
+  return OS;
+}
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
+  switch (Require) {
+STRINGIFY(RVV_REQ_RV64)
+STRINGIFY(RVV_REQ_Zvfhmin)
+STRINGIFY(RVV_REQ_Xsfvcp)
+STRINGIFY(RVV_REQ_Xsfvfnrclipxfqf)
+STRINGIFY(RVV_REQ_Xsfvfwmaccqqq)
+STRINGIFY(RVV_REQ_Xsfvqmaccdod)
+STRINGIFY(RVV_REQ_Xsfvqmaccqoq)
+STRINGIFY(RVV_REQ_Zvbb)
+STRINGIFY(RVV_REQ_Zvbc)
+STRINGIFY(RVV_REQ_Zvkb)
+STRINGIFY(RVV_REQ_Zvkg)
+STRINGIFY(RVV_REQ_Zvkned)
+STRINGIFY(RVV_REQ_Zvknha)
+STRINGIFY(RVV_REQ_Zvknhb)
+STRINGIFY(RVV_REQ_Zvksed)
+STRINGIFY(RVV_REQ_Zvksh)
+STRINGIFY(RVV_REQ_Zvfbfwma)
+STRINGIFY(RVV_REQ_Zvfbfmin)
+STRINGIFY(RVV_REQ_Zvfh)
+STRINGIFY(RVV_REQ_Experimental)
+  default:
+llvm_unreachable("Unsupported RVVRequire!"

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread Pengcheng Wang via cfe-commits

wangpc-pp wrote:

> @wangpc-pp you might want to revert this or fix it soon.

Reverted. Thanks!

https://github.com/llvm/llvm-project/pull/133710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-13 Thread Jim Lin via cfe-commits

https://github.com/tclin914 updated 
https://github.com/llvm/llvm-project/pull/135110

>From 1615cb987f60d8c6123f7c95bc7bd7f22d897ea1 Mon Sep 17 00:00:00 2001
From: Jim Lin 
Date: Wed, 9 Apr 2025 09:44:47 +0800
Subject: [PATCH 1/7] [RISCV] Add Andes XAndesperf (Andes Performance)
 extension.

The spec can be found at:
https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release.

This patch only supports assembler.

Relocation and fixup for the branch and gp-implied instructions will be
added in a later patch.
---
 .../Driver/print-supported-extensions-riscv.c |   1 +
 llvm/docs/RISCVUsage.rst  |   3 +
 llvm/docs/ReleaseNotes.md |   1 +
 .../Target/RISCV/AsmParser/RISCVAsmParser.cpp |  56 ++-
 .../RISCV/Disassembler/RISCVDisassembler.cpp  |  22 +-
 .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp |  23 +-
 llvm/lib/Target/RISCV/RISCVFeatures.td|   9 +
 llvm/lib/Target/RISCV/RISCVInstrInfo.td   |   1 +
 llvm/lib/Target/RISCV/RISCVInstrInfoXAndes.td | 358 ++
 llvm/test/CodeGen/RISCV/attributes.ll |   4 +
 llvm/test/CodeGen/RISCV/features-info.ll  |   1 +
 llvm/test/MC/RISCV/xandesperf-invalid.s   |  56 +++
 llvm/test/MC/RISCV/xandesperf-rv64-invalid.s  |  20 +
 llvm/test/MC/RISCV/xandesperf-rv64-valid.s|  34 ++
 llvm/test/MC/RISCV/xandesperf-valid.s | 105 +
 .../TargetParser/RISCVISAInfoTest.cpp |   1 +
 16 files changed, 673 insertions(+), 22 deletions(-)
 create mode 100644 llvm/lib/Target/RISCV/RISCVInstrInfoXAndes.td
 create mode 100644 llvm/test/MC/RISCV/xandesperf-invalid.s
 create mode 100644 llvm/test/MC/RISCV/xandesperf-rv64-invalid.s
 create mode 100644 llvm/test/MC/RISCV/xandesperf-rv64-valid.s
 create mode 100644 llvm/test/MC/RISCV/xandesperf-valid.s

diff --git a/clang/test/Driver/print-supported-extensions-riscv.c 
b/clang/test/Driver/print-supported-extensions-riscv.c
index d06cedac5b1eb..f65bfcc2e44d6 100644
--- a/clang/test/Driver/print-supported-extensions-riscv.c
+++ b/clang/test/Driver/print-supported-extensions-riscv.c
@@ -154,6 +154,7 @@
 // CHECK-NEXT: svnapot  1.0   'Svnapot' (NAPOT Translation 
Contiguity)
 // CHECK-NEXT: svpbmt   1.0   'Svpbmt' (Page-Based Memory 
Types)
 // CHECK-NEXT: svvptc   1.0   'Svvptc' (Obviating 
Memory-Management Instructions after Marking PTEs Valid)
+// CHECK-NEXT: xandesperf   5.0   'XAndesPerf' (Andes 
Performance Extension)
 // CHECK-NEXT: xcvalu   1.0   'XCValu' (CORE-V ALU 
Operations)
 // CHECK-NEXT: xcvbi1.0   'XCVbi' (CORE-V Immediate 
Branching)
 // CHECK-NEXT: xcvbitmanip  1.0   'XCVbitmanip' (CORE-V Bit 
Manipulation)
diff --git a/llvm/docs/RISCVUsage.rst b/llvm/docs/RISCVUsage.rst
index cda7e5fec8488..118f45abc1c31 100644
--- a/llvm/docs/RISCVUsage.rst
+++ b/llvm/docs/RISCVUsage.rst
@@ -503,6 +503,9 @@ The current vendor extensions supported are:
 ``experimental-XRivosVizip``
   LLVM implements `version 0.1 of the Rivos Vector Register Zips extension 
specification `__.
 
+``XAndesPerf``
+  LLVM implements `version 5.0.0 of the Andes Performance Extension 
specification 
`
 by Andes Technology. All instructions are prefixed with `nds.` as described in 
the specification.
+
 Experimental C Intrinsics
 =
 
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 526d6b4002bba..6c219a5af8398 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -159,6 +159,7 @@ Changes to the RISC-V Backend
 * Adds assembler support for ``.option exact``, which disables automatic 
compression,
   and branch and linker relaxation. This can be disabled with ``.option 
noexact``,
   which is also the default.
+* Adds assembler support for the Andes `XAndesperf` (Andes Performance 
extension).
 
 Changes to the WebAssembly Backend
 --
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp 
b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index c57c123ab01dc..3dafc21b84c21 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -536,19 +536,24 @@ struct RISCVOperand final : public MCParsedAsmOperand {
   }
 
   // True if operand is a symbol with no modifiers, or a constant with no
-  // modifiers and isShiftedInt(Op).
-  template  bool isBareSimmNLsb0() const {
-int64_t Imm;
-RISCVMCExpr::Specifier VK = RISCVMCExpr::VK_None;
+  // modifiers and isShiftedInt(Op).
+  template  bool isBareSimmNLsbK() const {
 if (!isImm())
   return false;
-bool IsConstantImm = evaluateConstantImm(getImm(), Imm);
-bool IsValid;
-if (!IsConstantImm)
-  IsVal

[clang-tools-extra] [clang-tidy] Improve `bugprone-exception-escape`: add stacktrace of escaped exception (PR #134375)

2025-04-13 Thread Baranov Victor via cfe-commits


@@ -28,6 +29,12 @@ class ExceptionAnalyzer {
  ///< definition.
   };
 
+  /// We use a SetVector to preserve the order of the functions in the call
+  /// stack as well as have fast lookup.
+  using CallStack = llvm::SetVector,
+llvm::DenseSet, 32>;

vbvictor wrote:

I can see a possible solution when we change `throwsException` method signature 
to 
```cpp
throwsException(const FunctionDecl *Func,
const ExceptionInfo::Throwables &Caught,
CallStack &CallStack,
SourceLocation CalledLoc); // new parameter to track from where 
'Func' was called
```
and later `CalledLoc` should be saved in `CallStack`
```cpp
if (const Stmt *Body = Func->getBody()) {
CallStack.insert({Func, CalledLoc}); // saved in llvm::MapVector<>
ExceptionInfo Result = throwsException(Body, Caught, CallStack);
```
I will try to implement this new logic and fall back to initial implementation 
if something goes wrong.

https://github.com/llvm/llvm-project/pull/134375
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Add back include for AutoConvert.h as it's needed for z/OS (PR #135430)

2025-04-13 Thread Sean Perry via cfe-commits

perry-ca wrote:

> I just happened to look into the implementation of AutoConvert.h, and I see 
> the entire interface is defined away when not targeting zOS. This means that 
> all call sites need to be conditional on `ifdef __MVS__`, which means we have 
> ugly ifdef droppings all over the codebase, which harms readability and 
> understandability.
> 
> Can whoever owns this redesign the header so that it provides inline 
> functions which have default implementations that return false / no_error to 
> disable their functionality on non-zOS platforms? Otherwise this failure mode 
> will happen again in the future. This seems like feedback that should've come 
> up in the original review (https://reviews.llvm.org/D100483), but I don't 
> recognize enough of the contributor names there to confirm that there was 
> some approval from maintainers or the broader community, it looks like this 
> was mostly approved by zOS stakeholders.

I had the same reflection.  I'd get that change made.   Thanks

https://github.com/llvm/llvm-project/pull/135430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-13 Thread Harald van Dijk via cfe-commits

https://github.com/hvdijk created 
https://github.com/llvm/llvm-project/pull/135564

RecordLayout::UnadjustedAlignment was documented as "Maximum of the alignments 
of the record members in characters", but 
RecordLayout::getUnadjustedAlignment(), which just returns UnadjustedAlignment, 
was documented as getting "the record alignment in characters, before alignment 
adjustement." These are not the same thing: the former excludes alignment of 
base classes, the latter takes it into account. 
ItaniumRecordLayoutBuilder::LayoutBase was setting it according to the former, 
but the AAPCS calling convention handling, currently the only user, relies on 
it being set according to the latter.

Fixes #135551.

>From 9580d5bcea1089c3d28899aaba9b9475869501dd Mon Sep 17 00:00:00 2001
From: Harald van Dijk 
Date: Sun, 13 Apr 2025 21:47:54 +0100
Subject: [PATCH] [ARM, AArch64] Fix passing of structures with aligned base
 classes

RecordLayout::UnadjustedAlignment was documented as "Maximum of the
alignments of the record members in characters", but
RecordLayout::getUnadjustedAlignment(), which just returns
UnadjustedAlignment, was documented as getting "the record alignment in
characters, before alignment adjustement." These are not the same thing:
the former excludes alignment of base classes, the latter takes it into
account. ItaniumRecordLayoutBuilder::LayoutBase was setting it according
to the former, but the AAPCS calling convention handling, currently the
only user, relies on it being set according to the latter.

Fixes #135551.
---
 clang/include/clang/AST/RecordLayout.h  |  7 +--
 clang/lib/AST/RecordLayoutBuilder.cpp   |  1 +
 clang/test/CodeGen/aapcs64-align.cpp| 57 +
 clang/test/CodeGen/arm-vfp16-arguments2.cpp |  2 +-
 4 files changed, 42 insertions(+), 25 deletions(-)

diff --git a/clang/include/clang/AST/RecordLayout.h 
b/clang/include/clang/AST/RecordLayout.h
index dd18f9c49f84f..6cf08e76396e2 100644
--- a/clang/include/clang/AST/RecordLayout.h
+++ b/clang/include/clang/AST/RecordLayout.h
@@ -75,8 +75,9 @@ class ASTRecordLayout {
   // performance or backwards compatibility preserving (e.g. AIX-ABI).
   CharUnits PreferredAlignment;
 
-  // UnadjustedAlignment - Maximum of the alignments of the record members in
-  // characters.
+  // UnadjustedAlignment - Alignment of record in characters before alignment
+  // adjustments. Maximum of the alignments of the record members and base
+  // classes in characters.
   CharUnits UnadjustedAlignment;
 
   /// RequiredAlignment - The required alignment of the object.  In the MS-ABI
@@ -186,7 +187,7 @@ class ASTRecordLayout {
   CharUnits getPreferredAlignment() const { return PreferredAlignment; }
 
   /// getUnadjustedAlignment - Get the record alignment in characters, before
-  /// alignment adjustement.
+  /// alignment adjustment.
   CharUnits getUnadjustedAlignment() const { return UnadjustedAlignment; }
 
   /// getSize - Get the record size in characters.
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp 
b/clang/lib/AST/RecordLayoutBuilder.cpp
index 3e756ab9b9bfe..b49bcd0e3ba42 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const 
BaseSubobjectInfo *Base) {
 setSize(std::max(getSize(), Offset + Layout.getSize()));
 
   // Remember max struct/class alignment.
+  UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
   UpdateAlignment(BaseAlign, UnpackedAlignTo, PreferredBaseAlign);
 
   return Offset;
diff --git a/clang/test/CodeGen/aapcs64-align.cpp 
b/clang/test/CodeGen/aapcs64-align.cpp
index e69faf231936c..f9be94b8ec58e 100644
--- a/clang/test/CodeGen/aapcs64-align.cpp
+++ b/clang/test/CodeGen/aapcs64-align.cpp
@@ -67,6 +67,21 @@ void g3() {
 // CHECK: declare void @f3(i64 noundef, i128)
 // CHECK: declare void @f3m(i64 noundef, i64 noundef, i64 noundef, i64 
noundef, i64 noundef, i128)
 
+// Increased natural alignment through a base class.
+struct SB16 : S16 {};
+
+void f4(long, SB16);
+void f4m(long, long, long, long, long, SB16);
+void g4() {
+  SB16 s = {6, 7};
+  f4(1, s);
+  f4m(1, 2, 3, 4, 5, s);
+}
+// CHECK: define{{.*}} void @g4
+// CHECK: call void @f4(i64 noundef 1, i128 129127208515966861318)
+// CHECK: call void @f4m(i64 noundef 1, i64 noundef 2, i64 noundef 3, i64 
noundef 4, i64 noundef 5, i128 129127208515966861318)
+// CHECK: declare void @f4(i64 noundef, i128)
+// CHECK: declare void @f4m(i64 noundef, i64 noundef, i64 noundef, i64 
noundef, i64 noundef, i128)
 
 // Packed structure.
 struct  __attribute__((packed)) P {
@@ -74,18 +89,18 @@ struct  __attribute__((packed)) P {
   long u;
 };
 
-void f4(int, P);
-void f4m(int, int, int, int, int, P);
-void g4() {
+void f5(int, P);
+void f5m(int, int, int, int, int, P);
+void g5() {
   P s = {6, 7};
-  f4(1, s);
-  f4m(1, 2, 3, 4, 5, s);
+  f5(1, s);
+  f5m(1, 2, 3, 4, 5, s);
 }
-// CHECK: define{{.*}} void @g4()
-// CHE

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-13 Thread Oliver Hunt via cfe-commits

ojhunt wrote:

@AaronBallman do you have any further requests or changes for this PR?

https://github.com/llvm/llvm-project/pull/100830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Sema] Use llvm::erase_if (NFC) (PR #135574)

2025-04-13 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/135574.diff


2 Files Affected:

- (modified) clang/lib/Sema/SemaTemplateInstantiateDecl.cpp (+4-6) 
- (modified) clang/lib/Sema/TreeTransform.h (+4-7) 


``diff
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 
b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 108d7e1dbaebc..5c80077f294c6 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1280,12 +1280,10 @@ void 
OpenACCDeclClauseInstantiator::VisitDevicePtrClause(
 const OpenACCDevicePtrClause &C) {
   llvm::SmallVector VarList = VisitVarList(C.getVarList());
   // Ensure each var is a pointer type.
-  VarList.erase(std::remove_if(VarList.begin(), VarList.end(),
-   [&](Expr *E) {
- return 
SemaRef.OpenACC().CheckVarIsPointerType(
- OpenACCClauseKind::DevicePtr, E);
-   }),
-VarList.end());
+  llvm::erase_if(VarList, [&](Expr *E) {
+return 
SemaRef.OpenACC().CheckVarIsPointerType(OpenACCClauseKind::DevicePtr,
+   E);
+  });
   ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
   if (SemaRef.OpenACC().CheckDeclareClause(ParsedClause,
OpenACCModifierKind::Invalid))
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 21e250e172d5e..bb58ec49612c8 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -11992,13 +11992,10 @@ void 
OpenACCClauseTransform::VisitDetachClause(
   llvm::SmallVector VarList = VisitVarList(C.getVarList());
 
   // Ensure each var is a pointer type.
-  VarList.erase(
-  std::remove_if(VarList.begin(), VarList.end(),
- [&](Expr *E) {
-   return Self.getSema().OpenACC().CheckVarIsPointerType(
-   OpenACCClauseKind::Detach, E);
- }),
-  VarList.end());
+  llvm::erase_if(VarList, [&](Expr *E) {
+return Self.getSema().OpenACC().CheckVarIsPointerType(
+OpenACCClauseKind::Detach, E);
+  });
 
   ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
   NewClause = OpenACCDetachClause::Create(

``




https://github.com/llvm/llvm-project/pull/135574
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread Pengcheng Wang via cfe-commits

https://github.com/wangpc-pp updated 
https://github.com/llvm/llvm-project/pull/133710

>From 031ef3fa34f0448dc9743135802e7c6be2025442 Mon Sep 17 00:00:00 2001
From: Wang Pengcheng 
Date: Mon, 31 Mar 2025 20:12:40 +0800
Subject: [PATCH 1/3] [RISCV][NFC] Make generated intrinsic records more
 human-readable

We add comment markers and print enum names instead of numbers.

For required extensions, we print the feature list instead of raw
bits.
---
 .../clang/Support/RISCVVIntrinsicUtils.h  |  22 +++-
 clang/lib/Sema/SemaRISCV.cpp  |   3 +-
 clang/lib/Support/RISCVVIntrinsicUtils.cpp| 107 ++
 clang/utils/TableGen/RISCVVEmitter.cpp|   8 +-
 4 files changed, 107 insertions(+), 33 deletions(-)

diff --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h 
b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index 8f2a4f54a1b7f..dd0817f225258 100644
--- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -11,6 +11,7 @@
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/BitmaskEnum.h"
+#include "llvm/ADT/Bitset.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include 
@@ -376,6 +377,8 @@ enum PolicyScheme : uint8_t {
   HasPolicyOperand,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS);
+
 // TODO refactor RVVIntrinsic class design after support all intrinsic
 // combination. This represents an instantiation of an intrinsic with a
 // particular type and prototype
@@ -507,6 +510,23 @@ enum RVVRequire {
   RVV_REQ_NUM,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require);
+
+struct RequiredExtensions {
+  llvm::Bitset Bits;
+  RequiredExtensions() {}
+  RequiredExtensions(std::initializer_list Init) {
+for (auto I : Init)
+  Bits.set(I);
+  }
+
+  void set(unsigned I) { Bits.set(I); }
+  bool operator[](unsigned I) const { return Bits[I]; }
+};
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+  const RequiredExtensions &Exts);
+
 // Raw RVV intrinsic info, used to expand later.
 // This struct is highly compact for minimized code size.
 struct RVVIntrinsicRecord {
@@ -518,7 +538,7 @@ struct RVVIntrinsicRecord {
   const char *OverloadedName;
 
   // Required target features for this intrinsic.
-  uint32_t RequiredExtensions[(RVV_REQ_NUM + 31) / 32];
+  RequiredExtensions RequiredExtensions;
 
   // Prototype for this intrinsic, index of RVVSignatureTable.
   uint16_t PrototypeIndex;
diff --git a/clang/lib/Sema/SemaRISCV.cpp b/clang/lib/Sema/SemaRISCV.cpp
index 746609604d1ba..b9f843b1920a1 100644
--- a/clang/lib/Sema/SemaRISCV.cpp
+++ b/clang/lib/Sema/SemaRISCV.cpp
@@ -232,8 +232,7 @@ void RISCVIntrinsicManagerImpl::ConstructRVVIntrinsics(
   for (auto &Record : Recs) {
 // Check requirements.
 if (llvm::any_of(FeatureCheckList, [&](const auto &Item) {
-  return ((Record.RequiredExtensions[Item.second / 32] &
-   (1U << (Item.second % 32))) != 0) &&
+  return Record.RequiredExtensions[Item.second] &&
  !TI.hasFeature(Item.first);
 }))
   continue;
diff --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp 
b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index e44fbb0181830..2b809a33037da 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -1196,36 +1196,93 @@ SmallVector 
parsePrototypes(StringRef Prototypes) {
   return PrototypeDescriptors;
 }
 
+#define STRINGIFY(NAME)
\
+  case NAME:   
\
+OS << #NAME;   
\
+break;
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS) {
+  switch (PS) {
+STRINGIFY(SchemeNone)
+STRINGIFY(HasPassthruOperand)
+STRINGIFY(HasPolicyOperand)
+  }
+  return OS;
+}
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
+  switch (Require) {
+STRINGIFY(RVV_REQ_RV64)
+STRINGIFY(RVV_REQ_Zvfhmin)
+STRINGIFY(RVV_REQ_Xsfvcp)
+STRINGIFY(RVV_REQ_Xsfvfnrclipxfqf)
+STRINGIFY(RVV_REQ_Xsfvfwmaccqqq)
+STRINGIFY(RVV_REQ_Xsfvqmaccdod)
+STRINGIFY(RVV_REQ_Xsfvqmaccqoq)
+STRINGIFY(RVV_REQ_Zvbb)
+STRINGIFY(RVV_REQ_Zvbc)
+STRINGIFY(RVV_REQ_Zvkb)
+STRINGIFY(RVV_REQ_Zvkg)
+STRINGIFY(RVV_REQ_Zvkned)
+STRINGIFY(RVV_REQ_Zvknha)
+STRINGIFY(RVV_REQ_Zvknhb)
+STRINGIFY(RVV_REQ_Zvksed)
+STRINGIFY(RVV_REQ_Zvksh)
+STRINGIFY(RVV_REQ_Zvfbfwma)
+STRINGIFY(RVV_REQ_Zvfbfmin)
+STRINGIFY(RVV_REQ_Zvfh)
+STRINGIFY(RVV_REQ_Experimental)
+  default:
+break;
+  }
+  return OS;
+}
+
+#undef STRINGIFY
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+  const RequiredExtensions &Exts) {
+  OS << "{";
+  const 

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread Pengcheng Wang via cfe-commits

https://github.com/wangpc-pp closed 
https://github.com/llvm/llvm-project/pull/133710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] d0cf5cd - [RISCV][NFC] Make generated intrinsic records more human-readable (#133710)

2025-04-13 Thread via cfe-commits

Author: Pengcheng Wang
Date: 2025-04-14T12:17:26+08:00
New Revision: d0cf5cd5f9790dc21396936d076389c3be1a9599

URL: 
https://github.com/llvm/llvm-project/commit/d0cf5cd5f9790dc21396936d076389c3be1a9599
DIFF: 
https://github.com/llvm/llvm-project/commit/d0cf5cd5f9790dc21396936d076389c3be1a9599.diff

LOG: [RISCV][NFC] Make generated intrinsic records more human-readable (#133710)

We add comment markers and print enum names instead of numbers.

For required extensions, we print the feature list instead of raw
bits.

Added: 


Modified: 
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/Sema/SemaRISCV.cpp
clang/lib/Support/RISCVVIntrinsicUtils.cpp
clang/utils/TableGen/RISCVVEmitter.cpp

Removed: 




diff  --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h 
b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index 8f2a4f54a1b7f..dd0817f225258 100644
--- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -11,6 +11,7 @@
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/BitmaskEnum.h"
+#include "llvm/ADT/Bitset.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include 
@@ -376,6 +377,8 @@ enum PolicyScheme : uint8_t {
   HasPolicyOperand,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS);
+
 // TODO refactor RVVIntrinsic class design after support all intrinsic
 // combination. This represents an instantiation of an intrinsic with a
 // particular type and prototype
@@ -507,6 +510,23 @@ enum RVVRequire {
   RVV_REQ_NUM,
 };
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require);
+
+struct RequiredExtensions {
+  llvm::Bitset Bits;
+  RequiredExtensions() {}
+  RequiredExtensions(std::initializer_list Init) {
+for (auto I : Init)
+  Bits.set(I);
+  }
+
+  void set(unsigned I) { Bits.set(I); }
+  bool operator[](unsigned I) const { return Bits[I]; }
+};
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+  const RequiredExtensions &Exts);
+
 // Raw RVV intrinsic info, used to expand later.
 // This struct is highly compact for minimized code size.
 struct RVVIntrinsicRecord {
@@ -518,7 +538,7 @@ struct RVVIntrinsicRecord {
   const char *OverloadedName;
 
   // Required target features for this intrinsic.
-  uint32_t RequiredExtensions[(RVV_REQ_NUM + 31) / 32];
+  RequiredExtensions RequiredExtensions;
 
   // Prototype for this intrinsic, index of RVVSignatureTable.
   uint16_t PrototypeIndex;

diff  --git a/clang/lib/Sema/SemaRISCV.cpp b/clang/lib/Sema/SemaRISCV.cpp
index 746609604d1ba..b9f843b1920a1 100644
--- a/clang/lib/Sema/SemaRISCV.cpp
+++ b/clang/lib/Sema/SemaRISCV.cpp
@@ -232,8 +232,7 @@ void RISCVIntrinsicManagerImpl::ConstructRVVIntrinsics(
   for (auto &Record : Recs) {
 // Check requirements.
 if (llvm::any_of(FeatureCheckList, [&](const auto &Item) {
-  return ((Record.RequiredExtensions[Item.second / 32] &
-   (1U << (Item.second % 32))) != 0) &&
+  return Record.RequiredExtensions[Item.second] &&
  !TI.hasFeature(Item.first);
 }))
   continue;

diff  --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp 
b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index e44fbb0181830..ee4d1e88e0ab8 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -1196,36 +1196,91 @@ SmallVector 
parsePrototypes(StringRef Prototypes) {
   return PrototypeDescriptors;
 }
 
+#define STRINGIFY(NAME)
\
+  case NAME:   
\
+OS << #NAME;   
\
+break;
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS) {
+  switch (PS) {
+STRINGIFY(SchemeNone)
+STRINGIFY(HasPassthruOperand)
+STRINGIFY(HasPolicyOperand)
+  }
+  return OS;
+}
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
+  switch (Require) {
+STRINGIFY(RVV_REQ_RV64)
+STRINGIFY(RVV_REQ_Zvfhmin)
+STRINGIFY(RVV_REQ_Xsfvcp)
+STRINGIFY(RVV_REQ_Xsfvfnrclipxfqf)
+STRINGIFY(RVV_REQ_Xsfvfwmaccqqq)
+STRINGIFY(RVV_REQ_Xsfvqmaccdod)
+STRINGIFY(RVV_REQ_Xsfvqmaccqoq)
+STRINGIFY(RVV_REQ_Zvbb)
+STRINGIFY(RVV_REQ_Zvbc)
+STRINGIFY(RVV_REQ_Zvkb)
+STRINGIFY(RVV_REQ_Zvkg)
+STRINGIFY(RVV_REQ_Zvkned)
+STRINGIFY(RVV_REQ_Zvknha)
+STRINGIFY(RVV_REQ_Zvknhb)
+STRINGIFY(RVV_REQ_Zvksed)
+STRINGIFY(RVV_REQ_Zvksh)
+STRINGIFY(RVV_REQ_Zvfbfwma)
+STRINGIFY(RVV_REQ_Zvfbfmin)
+STRINGIFY(RVV_REQ_Zvfh)
+STRINGIFY(RVV_REQ_Experimental)
+  default:
+llvm_unreachable("Unsupported RVVRequire!");
+break;
+  }
+  return OS;
+}
+
+#undef STRINGIFY
+
+llvm::raw_

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building 
`clang` at step 6 "build stage 1".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/133/builds/14454


Here is the relevant piece of the build log for the reference

```
Step 6 (build stage 1) failure: 'ninja' (failure)
[1/1193] Generating VCSRevision.h
[2/1193] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/lib/Support
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/lib/Support
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include
 -march=cascadelake -fPIC -fno-semantic-interposition 
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra 
-Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[3/1193] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/utils/TableGen
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/utils/TableGen
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/include
 
-I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include
 -march=cascadelake -fPIC -fno-semantic-interposition 
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra 
-Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/Tab

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`amdgpu-offload-rhel-9-cmake-build-only` running on `rocm-docker-rhel-9` while 
building `clang` at step 4 "annotate".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/205/builds/6327


Here is the relevant piece of the build log for the reference

```
Step 4 (annotate) failure: 
'../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py 
--jobs=32' (failure)
...
[1110/7775] Building LLVMOps.cpp.inc...
[/7775] Building LLVMOps.h.inc...
[1112/7775] Building MeshDialect.cpp.inc...
[1113/7775] Building MeshDialect.h.inc...
[1114/7775] Building MeshTypes.cpp.inc...
[1115/7775] Building MeshTypes.h.inc...
[1116/7775] Building CompilationAttrInterfaces.h.inc...
[1117/7775] Building MLProgramTypes.cpp.inc...
[1118/7775] Building MLProgramTypes.h.inc...
[1119/7775] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/tools/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/include
 
-I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/tools/clang/include
 -I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/build/include 
-I/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables 
-fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/botworker/bbot/amdgpu-offload-rhel-9-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[1120/7775] Building MLProgramOps.cpp.inc...
[1121/7775] Building MLProgramOps.h.inc...
[1122/7775] Building MLProgramOpsDialect.cpp.inc...
[1123/7775] Building MLProgramOpsDialect.h.inc...
[1124/7775] Building MLProgramOpsTypes.cpp.inc...
[1125/7775] Building MLProgramOpsTypes.h.inc...
[1126/7775] Building MPI.cpp.inc...
[1127/7775] Building MPI.h.inc...
[1128/7775] Building MPIDialect.cpp.inc...
[1129/7775] Linking CXX shared library lib/libLLVMTableGenCommon.so.21.0git
[1130/7775] Building MeshOps.cpp.inc...
[1131/7775] Building MPIDialect.h.inc...
[1132/7775] Building MeshOps.h.inc...
[1133/7775] Building LinalgTransformOpsEnums.cpp.inc...
[1134/7775] Building MPITypes.cpp.inc...
[1135/7775] Building IRDLAttributes.cpp.inc...
[1136/7775] Building LinalgTransformOpsEnums.h.inc...
[1137/7775] Building IRDLAttributes.h.inc...
[1138/7775] Building IRDLEnums.cpp.inc...
[1139/7775] Building IRDLEnums.h.inc...
[1140/7775] Building MPITypes.h.inc...
[1141/7775] Building NVGPUEnums.cpp.inc...
[1142/7775] Building NVGPUEnums.h.inc...
[1143/7775] Building GPUDeviceMapperEnums.cpp.inc...
[1144/7775] Building MPIOps.cpp.inc...
[1145/7775] Building GPUDeviceMapperEnums.h.inc...
[1146/7775] Building NVGPU.cpp.inc...
[1147/7775] Building LLVMTypes.cpp.inc...
[1148/7775] Building MPIOps.h.inc...
[1149/7775] Building LLVMTypes.h.inc...

```


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`cross-project-tests-sie-ubuntu-dwarf5` running on `doug-worker-1b` while 
building `clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/163/builds/17069


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
0.017 [1299/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
0.039 [1298/4/2] Generating VCSRevision.h
0.130 [1295/6/3] Linking CXX executable bin/llvm-config
1.714 [1295/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/clang/lib/Support
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/lib/Support
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
2.538 [1295/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running 
on `hip-vega20-0` while building `clang` at step 3 "annotate".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/123/builds/17448


Here is the relevant piece of the build log for the reference

```
Step 3 (annotate) failure: 
'../llvm-zorg/zorg/buildbot/builders/annotated/hip-build.sh --jobs=' (failure)
...
-- Generating done
-- Build files have been written to: 
/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm
+ build_step 'Building LLVM'
+ echo '@@@BUILD_STEP Building LLVM@@@'
+ ninja
@@@BUILD_STEP Building LLVM@@@
[1/1832] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[2/1832] Generating VCSRevision.h
[3/1832] Linking CXX executable bin/llvm-config
[4/1832] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/tools/clang/lib/Support
 -I/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/lib/Support 
-I/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/include 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/tools/clang/include
 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/include 
-I/home/botworker/bbot/clang-hip-vega20/llvm-project/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[5/1832] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/tools/clang/utils/TableGen
 -I/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/utils/TableGen 
-I/home/botworker/bbot/clang-hip-vega20/llvm-project/clang/include 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/tools/clang/include
 
-I/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/include 
-I/home/botworker/bbot/clang-hip-vega20/llvm-project/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tool

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building 
`clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/174/builds/16139


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
0.016 [2114/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
0.017 [2113/4/2] Generating VCSRevision.h
0.062 [2110/6/3] Linking CXX executable bin/llvm-config
0.947 [2110/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/lib/Support
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Support
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
1.620 [2110/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMak

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`clang-x86_64-linux-abi-test` running on `sie-linux-worker2` while building 
`clang` at step 6 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/8/builds/13936


Here is the relevant piece of the build log for the reference

```
Step 6 (build-unified-tree) failure: build (failure)
...
1.308 [6829/10/333] Building IntrinsicsHexagon.h...
1.309 [6828/10/334] Building IntrinsicsAMDGPU.h...
1.330 [6827/10/335] Building IntrinsicEnums.inc...
1.338 [6826/10/336] Building IntrinsicsAArch64.h...
1.349 [6825/10/337] Building IntrinsicsBPF.h...
1.387 [6824/10/338] Building IntrinsicImpl.inc...
1.871 [6823/10/339] Building IntrinsicsLoongArch.h...
1.896 [6822/10/340] Building IntrinsicsPowerPC.h...
1.924 [6821/10/341] Building IntrinsicsS390.h...
1.927 [6820/10/342] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/abi-test/build/tools/clang/lib/Support 
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/lib/Support 
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/include 
-I/home/buildbot/buildbot-root/abi-test/build/tools/clang/include 
-I/home/buildbot/buildbot-root/abi-test/build/include 
-I/home/buildbot/buildbot-root/abi-test/llvm/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/buildbot-root/abi-test/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/buildbot-root/abi-test/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/buildbot-root/abi-test/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
1.985 [6820/9/343] Building IntrinsicsNVPTX.h...
2.025 [6820/8/344] Building IntrinsicsR600.h...
2.026 [6820/7/345] Building IntrinsicsRISCV.h...
2.032 [6820/6/346] Building IntrinsicsSPIRV.h...
2.086 [6820/5/347] Building IntrinsicsMips.h...
2.281 [6820/4/348] Building IntrinsicsWebAssembly.h...
2.301 [6820/3/349] Building IntrinsicsX86.h...
2.315 [6820/2/350] Building IntrinsicsVE.h...
2.552 [6820/1/351] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/abi-test/build/tools/clang/utils/TableGen 
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/utils/TableGen 
-I/home/buildbot/buildbot-root/abi-test/llvm/clang/include 
-I/home/buildbot/buildbot-root/abi-test/build/tools/clang/include 
-I/home/buildbot/buildbot-root/abi-test/build/include 
-I/home/buildbot/buildbot-root/abi-test/llvm/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagn

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while 
building `clang` at step 5 "compile-openmp".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/140/builds/21113


Here is the relevant piece of the build log for the reference

```
Step 5 (compile-openmp) failure: build (failure)
...
1.194 [5957/32/1167] Building PDLOpsTypes.h.inc...
1.194 [5956/32/1168] Building OpenMPOpsAttributes.h.inc...
1.195 [5955/32/1169] Building OpenMPOpsEnums.cpp.inc...
1.195 [5954/32/1170] Building OpenMPOpsEnums.h.inc...
1.196 [5953/32/1171] Building OpenMPOpsTypes.cpp.inc...
1.197 [5952/32/1172] Building PDLInterpOpsDialect.cpp.inc...
1.197 [5951/32/1173] Building PDLInterpOpsDialect.h.inc...
1.197 [5950/32/1174] Building OpenACCOpsAttributes.h.inc...
1.198 [5949/32/1175] Building OpenACCOpsAttributes.cpp.inc...
1.198 [5948/32/1176] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/Support 
-I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Support
 -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/include 
-Itools/clang/include -Iinclude 
-I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wno-comment -Wno-misleading-indentation -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++1z -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:0:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ [-fpermissive]
   RequiredExtensions RequiredExtensions;
  ^~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 error: changes meaning of ‘RequiredExtensions’ from ‘struct 
clang::RISCV::RequiredExtensions’ [-fpermissive]
 struct RequiredExtensions {
^~
1.198 [5948/31/1177] Building PDLInterpOpsTypes.cpp.inc...
1.199 [5948/30/1178] Building PDLInterpOpsTypes.h.inc...
1.199 [5948/29/1179] Building OpenMPOpsTypes.h.inc...
1.200 [5948/28/1180] Building NVGPUAttrDefs.cpp.inc...
1.201 [5948/27/1181] Building no-output...
1.202 [5948/26/1182] Building PDLInterpOps.cpp.inc...
1.203 [5948/25/1183] Building PolynomialAttributes.cpp.inc...
1.203 [5948/24/1184] Building PolynomialAttributes.h.inc...
1.203 [5948/23/1185] Building PDLInterpOps.h.inc...
1.204 [5948/22/1186] Building PolynomialDialect.cpp.inc...
1.204 [5948/21/1187] Building NVGPUAttrDefs.h.inc...
1.204 [5948/20/1188] Building PtrOpsAttrs.cpp.inc...
1.204 [5948/19/1189] Building PolynomialDialect.h.inc...
1.204 [5948/18/1190] Building PolynomialTypes.h.inc...
1.204 [5948/17/1191] Building PolynomialTypes.cpp.inc...
1.204 [5948/16/1192] Building PtrOpsAttrs.h.inc...
1.205 [5948/15/1193] Building OpenACCOps.h.inc...
1.205 [5948/14/1194] Building OpenACCOps.cpp.inc...
1.205 [5948/13/1195] Building PtrOps.cpp.inc...
1.205 [5948/12/1196] Building Polynomial.h.inc...
1.205 [5948/11/1197] Building PtrOps.h.inc...
1.205 [5948/10/1198] Building PtrOpsDialect.cpp.inc...
1.206 [5948/9/1199] Building Polynomial.cpp.inc...
1.206 [5948/8/1200] Building OpenACCOpsInterfaces.cpp.inc...
1.206 [5948/7/1201] Building OpenMPOps.cpp.inc...
1.206 [5948/6/1202] Building OpenMPOps.h.inc...
1.230 [5948/5/1203] Building LLVMIntrinsicOps.cpp.inc...
1.232 [5948/4/1204] Building LLVMIntrinsicOps.h.inc...
1.251 [5948/3/1205] Linking CXX executable bin/llvm-tblgen
1.515 [5948/2/1206] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o

```



https://github.com/llvm/l

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`cross-project-tests-sie-ubuntu` running on `doug-worker-1a` while building 
`clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/181/builds/17515


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
0.015 [1299/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
0.016 [1298/4/2] Generating VCSRevision.h
0.075 [1295/6/3] Linking CXX executable bin/llvm-config
1.338 [1295/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/clang/lib/Support
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/lib/Support
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/clang/include
 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
1.817 [1295/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/opt/ccache/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/clang/include
 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include 
-I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while 
building `clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/144/builds/22657


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
0.012 [1717/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
0.018 [1716/4/2] Generating VCSRevision.h
0.052 [1713/6/3] Linking CXX executable bin/llvm-config
0.792 [1713/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++ -DCLANG_EXPORTS 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/lib/Support
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Support
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
1.358 [1713/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++ -DCLANG_EXPORTS 
-DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/utils/TableGen
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/include
 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/include
 -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include 
-I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-vi

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-runtime-cuda-gcc` 
running on `as-builder-7` while building `clang` at step 6 "build-flang-rt".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/152/builds/1769


Here is the relevant piece of the build log for the reference

```
Step 6 (build-flang-rt) failure: cmake (failure)
...
2.516 [5969/64/637] Building IRDL.h.inc...
2.517 [5968/64/638] Building IRDLDialect.cpp.inc...
2.517 [5967/64/639] Building IRDLDialect.h.inc...
2.518 [5966/64/640] Building IRDLTypes.cpp.inc...
2.519 [5965/64/641] Building IRDLTypes.h.inc...
2.520 [5964/64/642] Building IRDLInterfaces.cpp.inc...
2.521 [5963/64/643] Building IRDLInterfaces.h.inc...
2.522 [5962/64/644] Building Passes.h.inc...
2.523 [5961/64/645] Building Passes.h.inc...
2.525 [5960/64/646] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/g++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/build/tools/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/build/tools/clang/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/build/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-gcc/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
2.525 [5960/63/647] Building EmitC.cpp.inc...
2.525 [5960/62/648] Building GPUOpsTypes.cpp.inc...
2.525 [5960/61/649] Building GPUOpsTypes.h.inc...
2.525 [5960/60/650] Building IndexOpsDialect.h.inc...
2.525 [5960/59/651] Building IndexOpsTypes.cpp.inc...
2.525 [5960/58/652] Building IndexOpsTypes.h.inc...
2.525 [5960/57/653] Building RelayoutOpInterface.cpp.inc...
2.525 [5960/56/654] Building RelayoutOpInterface.h.inc...
2.525 [5960/55/655] Building DeviceMappingAttrInterface.cpp.inc...
2.525 [5960/54/656] Building DeviceMappingAttrInterface.h.inc...
2.525 [5960/53/657] Building DeviceMappingAttributes.cpp.inc...
2.525 [5960/52/658] Building DeviceMappingAttributes.h.inc...
2.525 [5960/51/659] Building Passes.h.inc...
2.525 [5960/50/660] Building EmitC.h.inc...
2.528 [5960/49/661] Building ParallelLoopMapperEnums.h.inc...
2.529 [5960/48/662] Building IndexOps.cpp.inc...
2.529 [5960/47/663] Building Passes.h.inc...
2.530 [5960/46/664] Building IndexOps.h.inc...
2.531 [5960/45/665] Building IRDLExtensionOps.h.inc...
2.541 [5960/44/666] Building LinalgMatchOps.cpp.inc...
2.543 [5960/43/667] Building MathOpsDialect.cpp.inc...
2.543 [5960/42/668] Building ShardingInterface.cpp.inc...
2.544 [5960/41/669] Building MathOpsDialect.h.inc...
2.544 [5960/40/670] Building ShardingInterface.h.inc...
2.544 [5960/39

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `arc-builder` running on 
`arc-worker` while building `clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/3/builds/14487


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
0.021 [1184/4/1] Generating VCSRevision.h
0.975 [1181/6/2] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS -Itools/clang/lib/Support 
-I/buildbot/worker/arc-folder/llvm-project/clang/lib/Support 
-I/buildbot/worker/arc-folder/llvm-project/clang/include -Itools/clang/include 
-Iinclude -I/buildbot/worker/arc-folder/llvm-project/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/buildbot/worker/arc-folder/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/buildbot/worker/arc-folder/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of 'clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions' changes meaning of 
'RequiredExtensions' [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: 'RequiredExtensions' declared here as 'struct 
clang::RISCV::RequiredExtensions'
  515 | struct RequiredExtensions {
  |^~
1.758 [1181/5/3] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/utils/TableGen 
-I/buildbot/worker/arc-folder/llvm-project/clang/utils/TableGen 
-I/buildbot/worker/arc-folder/llvm-project/clang/include -Itools/clang/include 
-Iinclude -I/buildbot/worker/arc-folder/llvm-project/llvm/include -fPIC 
-fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall 
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -c 
/buildbot/worker/arc-folder/llvm-project/clang/utils/TableGen/RISCVVEmitter.cpp
In file included from 
/buildbot/worker/arc-folder/llvm-project/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of 'clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions' changes meaning of 
'RequiredExtensions' [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/buildbot/worker/arc-folder/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: 'RequiredExtensions' declared here as 'struct 
clang::RISCV::RequiredExtensions'
  515 | struct RequiredExt

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`amdgpu-offload-rhel-8-cmake-build-only` running on `rocm-docker-rhel-8` while 
building `clang` at step 4 "annotate".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/204/builds/6349


Here is the relevant piece of the build log for the reference

```
Step 4 (annotate) failure: 
'../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py 
--jobs=32' (failure)
...
[990/7775] Building EmitCTypes.cpp.inc...
[991/7775] Building EmitCTypes.h.inc...
[992/7775] Building EmitC.cpp.inc...
[993/7775] Building EmitC.h.inc...
[994/7775] Building FuncOps.cpp.inc...
[995/7775] Building FuncOpsDialect.cpp.inc...
[996/7775] Building FuncOpsDialect.h.inc...
[997/7775] Building FuncTransformOps.cpp.inc...
[998/7775] Building FuncTransformOps.h.inc...
[999/7775] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/tools/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include
 
-I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/tools/clang/include
 -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/include 
-I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ [-fpermissive]
   RequiredExtensions RequiredExtensions;
  ^~
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 error: changes meaning of ‘RequiredExtensions’ from ‘struct 
clang::RISCV::RequiredExtensions’ [-fpermissive]
 struct RequiredExtensions {
^~
[1000/7775] Linking CXX static library lib/libLLVMTableGenCommon_static.a
[1001/7775] Building FuncOps.h.inc...
[1002/7775] Building Passes.capi.cpp.inc...
[1003/7775] Building Passes.capi.h.inc...
[1004/7775] Building Passes.h.inc...
[1005/7775] Building GPUOpInterfaces.cpp.inc...
[1006/7775] Building GPUOpInterfaces.h.inc...
[1007/7775] Building GPUOpsDialect.cpp.inc...
[1008/7775] Building GPUOpsDialect.h.inc...
[1009/7775] Building ArmSMEIntrinsicConversions.inc...
[1010/7775] Building GPUOpsTypes.cpp.inc...
[1011/7775] Building IndexAttrs.cpp.inc...
[1012/7775] Building IndexAttrs.h.inc...
[1013/7775] Building GPUOpsTypes.h.inc...
[1014/7775] Building GPUTransformOps.cpp.inc...
[1015/7775] Building IndexEnums.cpp.inc...
[1016/7775] Building IndexEnums.h.inc...
[1017/7775] Linking CXX shared library lib/libLLVMDebugInfoBTF.so.21.0git
[1018/7775] Building GPUTransformOps.h.inc...
[1019/7775] Building IndexOpsDialect.h.inc...
[1020/7775] Building IndexOpsDialect.cpp.inc...
[1021/7775] Building ArmSMEIntrinsicOps.cpp.inc...
[1022/7775] Building ArmSMEIntrinsicOps.h.inc...
[1023/7775] Building IndexOps.cpp.inc...
[1024/7775] Building IndexOps.h.inc...
[1025/7775] Linking CXX shared library lib/libLLVMRemarks.so.21.0git
[1026/7775] Linking CXX shared library lib/libLLVMOrcShared.so.21.0git
[1027/7775] Building GPUOps.h.inc...
[1028/7775] Building GPUOps.cpp.inc...
[1029/7775] Building ARMTargetParserDef.inc...

```



https://github.com/llvm/llvm-project/pull/133710

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while 
building `clang` at step 6 "build-stage1-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/168/builds/10849


Here is the relevant piece of the build log for the reference

```
Step 6 (build-stage1-unified-tree) failure: build (failure)
2.943 [1528/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
3.128 [1527/4/2] Generating VCSRevision.h
3.645 [1524/6/3] Linking CXX executable bin/llvm-config
5.623 [1524/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ [-fpermissive]
   RequiredExtensions RequiredExtensions;
  ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 error: changes meaning of ‘RequiredExtensions’ from ‘struct 
clang::RISCV::RequiredExtensions’ [-fpermissive]
 struct RequiredExtensions {
^~
8.120 [1524/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 
-DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include
 -fPIC -fno-semantic-int

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-runtime-cuda-clang` 
running on `as-builder-7` while building `clang` at step 7 
"build-flang-default".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/7/builds/13381


Here is the relevant piece of the build log for the reference

```
Step 7 (build-flang-default) failure: cmake (failure)
...
2.918 [6074/26/1676] Linking CXX shared module lib/Bye.so
2.920 [6074/25/1677] Linking CXX shared module 
unittests/Analysis/InlineAdvisorPlugin.so
2.922 [6074/24/1678] Linking CXX shared module 
unittests/Passes/Plugins/TestPlugin.so
2.924 [6074/23/1679] Building LLVMConvertibleLLVMIRIntrinsics.inc...
2.925 [6074/22/1680] Building LLVMIntrinsicConversions.inc...
2.925 [6074/21/1681] Linking CXX shared module 
unittests/Analysis/InlineOrderPlugin.so
2.926 [6074/20/1682] Linking CXX shared module 
unittests/Passes/Plugins/DoublerPlugin.so
2.927 [6074/19/1683] Building LLVMIntrinsicFromLLVMIRConversions.inc...
2.939 [6072/20/1684] Linking CXX shared library 
lib/libmlir_arm_runner_utils.so.21.0git
2.940 [6071/20/1685] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DCLANG_EXPORTS 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang/tools/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang/tools/clang/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang/include
 
-I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
2.940 [6071/19/1686] Linking CXX shared library 
lib/libmlir_float16_utils.so.21.0git
2.941 [6071/18/1687] Linking CXX shared library 
lib/libmlir_arm_sme_abi_stubs.so.21.0git
2.943 [6071/17/1688] Building TensorEncInterfaces.cpp.inc...
2.944 [6071/16/1689] Building TensorEncInterfaces.h.inc...
2.961 [6071/15/1690] Building TestOpsDialect.cpp.inc...
2.962 [6071/14/1691] Building TestOpsDialect.h.inc...
2.963 [6071/13/1692] Creating library symlink lib/libmlir_arm_runner_utils.so
2.971 [6071/12/1693] Building TestPatterns.inc...
2.977 [6071/11/1694] Building BasicPtxBuilderInterface.cpp.inc...
2.978 [6071/10/1695] Building BasicPtxBuilderInterface.h.inc...
3.026 [6071/9/1696] Building SPIRVSerialization.inc...
3.110 [6071/8/1697] Linking CXX shared library 
lib/libmlir_async_runtime.so.21.0git
3.147 [6071/7/1698] Linking CXX executable bin/llvm-opt-report
3.166 [6071/6/1699] Linking CXX executable bin/mlir-src-sharder
3.206 [6071/5/1700] Linking CXX 

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` 
running on `as-builder-9` while building `clang` at step 7 "build-default".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/195/builds/7561


Here is the relevant piece of the build log for the reference

```
Step 7 (build-default) failure: cmake (failure)
...
1.699 [4897/33/394] Building SymbolFileDWARFProperties.inc...
1.699 [4897/32/395] Building SymbolLocatorDebuginfodProperties.inc...
1.699 [4897/31/396] Building TraceExporterCTFCommandOptions.inc...
1.699 [4897/30/397] Building SymbolFileDWARFPropertiesEnum.inc...
1.700 [4897/29/398] Building SymbolLocatorDebuginfodPropertiesEnum.inc...
1.700 [4897/28/399] Building TargetPropertiesEnum.inc...
1.700 [4897/27/400] Building TargetProperties.inc...
1.735 [4897/26/401] Linking CXX static library lib/libLLVMFrontendOpenACC.a
1.736 [4897/25/402] Linking CXX static library lib/libLLVMCodeGenTypes.a
2.067 [4897/24/403] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/lib/Support
 
-I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/include
 
-I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/clang/include
 -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include 
-I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/include
 -D__OPTIMIZE__ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull 
-Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables 
-fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-Wchanges-meaning]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:3:
 note: used here to mean ‘struct clang::RISCV::RequiredExtensions’
  541 |   RequiredExtensions RequiredExtensions;
  |   ^~
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: declared here
  515 | struct RequiredExtensions {
  |^~
2.068 [4897/23/404] Building IntrinsicEnums.inc...
2.069 [4897/22/405] Building IntrinsicsSPIRV.h...
2.071 [4897/21/406] Building IntrinsicsARM.h...
2.072 [4897/20/407] Building IntrinsicsHexagon.h...
2.075 [4897/19/408] Building IntrinsicsS390.h...
2.075 [4897/18/409] Building IntrinsicsX86.h...
2.076 [4897/17/410] Building IntrinsicsVE.h...
2.077 [4897/16/411] Building IntrinsicsXCore.h...
2.078 [4897/15/412] Building IntrinsicsWebAssembly.h...
2.085 [4897/14/413] Building IntrinsicsAArch64.h...
2.088 [4897/13/414] Building IntrinsicsAMDGPU.h...
2.092 [4897/12/415] Building IntrinsicsLoongArch.h...
2.092 [4897/11/416] Building IntrinsicsR600.h...
2.096 [4897/10/417] Building IntrinsicsPowerPC.h...
2.099 [4897/9/418] Building IntrinsicsNVPTX.h...
2.099 [4897/8/419] Building IntrinsicsMips.h...
2.100 [4897/7/420] Building IntrinsicsBPF.h...
2.101 [4897/6/421] Building IntrinsicsDirectX.h...
2.101 [4897/5/422] Building IntrinsicsRISCV.h...
2.134 [4897/4/423] Building IntrinsicIm

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` 
running on `suse-gary-m68k-cross` while building `clang` at step 4 "build stage 
1".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/27/builds/8576


Here is the relevant piece of the build log for the reference

```
Step 4 (build stage 1) failure: 'ninja' (failure)
[1/1819] Generating VCSRevision.h
[2/1819] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/lib/Support
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Support
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull 
-Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables 
-fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-Wchanges-meaning]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:3:
 note: used here to mean ‘struct clang::RISCV::RequiredExtensions’
  541 |   RequiredExtensions RequiredExtensions;
  |   ^~
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: declared here
  515 | struct RequiredExtensions {
  |^~
[3/1819] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/utils/TableGen
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/utils/TableGen
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/include
 
-I/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull 
-Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`polly-x86_64-linux-shlib-plugin` running on `polly-x86_64-gce2` while building 
`clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/75/builds/6187


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1206] Generating VCSRevision.h
[2/1206] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1206] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
[4/1206] Building CXX object 
lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[5/1206] Linking CXX executable bin/llvm-config
[6/1206] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -c 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:48:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
{anonymous}::SemaRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
   48 |   RequiredExtensions RequiredExtensions;
  |  ^~
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[7/1206] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/b

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while 
building `clang` at step 5 "build-unified-tree".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/95/builds/11961


Here is the relevant piece of the build log for the reference

```
Step 5 (build-unified-tree) failure: build (failure)
5.517 [1842/4/1] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
5.817 [1841/4/2] Generating VCSRevision.h
6.662 [1838/6/3] Linking CXX executable bin/llvm-config
11.105 [1838/5/4] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ [-fpermissive]
   RequiredExtensions RequiredExtensions;
  ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 error: changes meaning of ‘RequiredExtensions’ from ‘struct 
clang::RISCV::RequiredExtensions’ [-fpermissive]
 struct RequiredExtensions {
^~
12.521 [1838/4/5] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 
-DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializ

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux` 
running on `polly-x86_64-gce1` while building `clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/105/builds/8316


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1174] Generating VCSRevision.h
[2/1174] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1174] Linking CXX executable bin/llvm-config
[4/1174] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[5/1174] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblg

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-shared` 
running on `polly-x86_64-gce2` while building `clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/97/builds/6061


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1342] Generating VCSRevision.h
[2/1342] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1342] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -c 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:48:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
{anonymous}::SemaRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
   48 |   RequiredExtensions RequiredExtensions;
  |  ^~
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[4/1342] Building CXX object 
lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[5/1342] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
ninja: build stopped: subcommand failed.

```



https://github.com/llvm/llvm-project/pull/133710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-plugin` 
running on `polly-x86_64-gce1` while building `clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/158/builds/7856


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1174] Generating VCSRevision.h
[2/1174] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1174] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o
[4/1174] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
[5/1174] Building CXX object 
lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[6/1174] Linking CXX executable bin/llvm-config
[7/1174] Linking CXX static library lib/libLLVMObject.a
[8/1174] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[9/1174] Linking CXX static library lib/libLLVMLTO.a
[10/1174] Linking CXX static library lib/libLLVMAsmPrinter.a
[11/1174] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-W

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`polly-x86_64-linux-noassert` running on `polly-x86_64-gce1` while building 
`clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/28/builds/8361


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1174] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[2/1174] Generating VCSRevision.h
[3/1174] Linking CXX executable bin/llvm-config
[4/1174] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[5/1174] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -c 
/home/worker/buildbot-workers/polly-x86_6

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` 
while building `clang` at step 4 "build stage 1".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/76/builds/8722


Here is the relevant piece of the build log for the reference

```
Step 4 (build stage 1) failure: 'ninja' (failure)
[1/2117] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[2/2117] Generating VCSRevision.h
[3/2117] Linking CXX executable bin/llvm-config
[4/2117] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/lib/Support
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment 
-Wno-misleading-indentation -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ [-fpermissive]
   RequiredExtensions RequiredExtensions;
  ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 error: changes meaning of ‘RequiredExtensions’ from ‘struct 
clang::RISCV::RequiredExtensions’ [-fpermissive]
 struct RequiredExtensions {
^~
[5/2117] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/lib64/ccache/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 
-DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/utils/TableGen
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/tools/clang/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/include
 
-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` 
running on `systemz-1` while building `clang` at step 5 "compile-openmp".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/88/builds/10398


Here is the relevant piece of the build log for the reference

```
Step 5 (compile-openmp) failure: build (failure)
...
231.621 [2009/4/3356] Building CXX object 
tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/echo.cpp.o
231.633 [2008/4/3357] Building C object 
tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/main.c.o
231.643 [2007/4/3358] Building C object 
tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o
231.670 [2006/4/3359] Creating export file for SampleAnalyzerPlugin
231.707 [2005/4/3360] Building CXX object 
tools/llvm-sim/CMakeFiles/llvm-sim.dir/llvm-sim.cpp.o
231.740 [2004/4/3361] Creating export file for 
CheckerDependencyHandlingAnalyzerPlugin
231.765 [2003/4/3362] Creating export file for 
CheckerOptionHandlingAnalyzerPlugin
231.816 [2002/4/3363] Bundling HTMLLogger resources
231.867 [2001/4/3364] Building CXX object 
tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o
232.996 [2000/4/3365] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DCLANG_EXPORTS 
-DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/tools/clang/lib/Support
 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/lib/Support 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/include 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/tools/clang/include
 -I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/include 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of 'clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions' changes meaning of 
'RequiredExtensions' [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: 'RequiredExtensions' declared here as 'struct 
clang::RISCV::RequiredExtensions'
  515 | struct RequiredExtensions {
  |^~
233.052 [2000/3/3366] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DCLANG_EXPORTS 
-DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/tools/clang/utils/TableGen
 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/utils/TableGen
 -I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/clang/include 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/tools/clang/include
 -I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/include 
-I/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializ

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread Sudharsan Veeravalli via cfe-commits

svs-quic wrote:

@wangpc-pp you might want to revert this or fix it soon.

https://github.com/llvm/llvm-project/pull/133710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-shlib` 
running on `polly-x86_64-gce2` while building `clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/99/builds/5910


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1206] Generating VCSRevision.h
[2/1206] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1206] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -MF 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o.d -o 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o -c 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:48:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
{anonymous}::SemaRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
   48 |   RequiredExtensions RequiredExtensions;
  |  ^~
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen/RISCVVEmitter.cpp:17:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[4/1206] Building CXX object 
lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[5/1206] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
ninja: build stopped: subcommand failed.

```



https://github.com/llvm/llvm-project/pull/133710
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building 
`clang` at step 5 "compile-openmp".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/10/builds/3389


Here is the relevant piece of the build log for the reference

```
Step 5 (compile-openmp) failure: build (failure)
...
0.786 [3785/51/779] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/Analysis.cpp.o
0.786 [3785/50/780] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/Clustering.cpp.o
0.786 [3785/49/781] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/CodeTemplate.cpp.o
0.787 [3785/48/782] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/DisassemblerHelper.cpp.o
0.787 [3785/47/783] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/Error.cpp.o
0.787 [3785/46/784] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/MCInstrDescView.cpp.o
0.787 [3785/45/785] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/PerfHelper.cpp.o
0.787 [3785/44/786] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/RegisterAliasing.cpp.o
0.787 [3785/43/787] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/RegisterValue.cpp.o
0.787 [3785/42/788] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/lib/Support
 
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Support
 
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include 
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/include
 -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/include 
-I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
0.788 [3785/41/789] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/BenchmarkResult.cpp.o
0.788 [3785/40/790] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/BenchmarkRunner.cpp.o
0.788 [3785/39/791] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/LatencyBenchmarkRunner.cpp.o
0.789 [3785/38/792] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/LlvmState.cpp.o
0.789 [3785/37/793] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/ParallelSnippetGenerator.cpp.o
0.789 [3785/36/794] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/ResultAggregator.cpp.o
0.789 [3785/35/795] Building CXX object 
tools/llvm-exegesis/lib/CMakeFiles/obj.LLVMExegesis.dir/SchedClassR

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`polly-x86_64-linux-shared-plugin` running on `polly-x86_64-gce2` while 
building `clang` at step 5 "build".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/118/builds/5768


Here is the relevant piece of the build log for the reference

```
Step 5 (build) failure: 'ninja' (failure)
[1/1340] Generating VCSRevision.h
[2/1340] Building CXX object 
tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/1340] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
[4/1340] Building CXX object 
lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
[5/1340] Linking CXX executable bin/llvm-config
[6/1340] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/lib/Support
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[7/1340] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC 
-D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/utils/TableGen
 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/clang/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/tools/clang/include
 -I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.obj/include 
-I/home/worker/buildbot-workers/polly-x86_64-gce2/rundir/llvm.src/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 
-DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/clang/utils/TableG

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-04-13 Thread Oliver Hunt via cfe-commits

ojhunt wrote:

@AaronBallman are you ok with this now? I'm re-requesting the review as it's 
been a while, and I want to confirm I addressed things as you wanted

https://github.com/llvm/llvm-project/pull/117428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-13 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Oleksandr T. (a-tarasyuk)


Changes

Fixes #132038 

--- 

This PR extends `-Wloop-analysis` to handle variable modifications inside 
lambda expressions.


---
Full diff: https://github.com/llvm/llvm-project/pull/135573.diff


3 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+2) 
- (modified) clang/lib/Sema/SemaStmt.cpp (+12-2) 
- (modified) clang/test/SemaCXX/warn-loop-analysis.cpp (+15) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 5217e04b5e83f..77d15d798097b 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -319,6 +319,8 @@ Improvements to Clang's diagnostics
 - ``-Wc++98-compat`` no longer diagnoses use of ``__auto_type`` or
   ``decltype(auto)`` as though it was the extension for ``auto``. (#GH47900)
 
+- The ``-Wloop-analysis`` warning now handles variable modifications inside 
lambda expressions (#GH132038).
+
 Improvements to Clang's time-trace
 --
 
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index e1b9ccc693bd5..a1718d5a549e4 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -1995,9 +1995,19 @@ namespace {
 }
 
 void VisitDeclRefExpr(DeclRefExpr *E) {
-  if (VarDecl *VD = dyn_cast(E->getDecl()))
+  if (VarDecl *VD = dyn_cast(E->getDecl())) {
 if (Decls.count(VD))
   FoundDecl = true;
+  } else {
+if (CXXMethodDecl *MD = dyn_cast(E->getDecl()))
+  if (isLambdaCallOperator(MD))
+Visit(MD->getBody());
+  }
+}
+
+void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
+  if (Expr *Callee = E->getCallee())
+Visit(Callee);
 }
 
 void VisitPseudoObjectExpr(PseudoObjectExpr *POE) {
@@ -2014,7 +2024,7 @@ namespace {
 
 bool FoundDeclInUse() { return FoundDecl; }
 
-  };  // end class DeclMatcher
+  }; // end class DeclMatcher
 
   void CheckForLoopConditionalStatement(Sema &S, Expr *Second,
 Expr *Third, Stmt *Body) {
diff --git a/clang/test/SemaCXX/warn-loop-analysis.cpp 
b/clang/test/SemaCXX/warn-loop-analysis.cpp
index 324dd386292ac..cfed3c23a2e9e 100644
--- a/clang/test/SemaCXX/warn-loop-analysis.cpp
+++ b/clang/test/SemaCXX/warn-loop-analysis.cpp
@@ -299,3 +299,18 @@ void test10() {
   for (auto[i, j, k] = arr; i < a; ++i) { }
   for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
 };
+
+extern void foo(int);
+void test11() {
+  int a = 0;
+  auto incr_a = [&a]() { ++a; };
+
+  for (int b = 10; a <= b; incr_a())
+foo(a);
+
+  for (int b = 10; a <= b;)
+incr_a();
+
+  for (int b = 10; a <= b; [&a]() { ++a; }()) { }
+  for (int b = 10; a <= b; [&a]() { }()) { } // expected-warning {{variables 
'a' and 'b' used in loop condition not modified in loop body}}
+}

``




https://github.com/llvm/llvm-project/pull/135573
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-13 Thread Oliver Hunt via cfe-commits

ojhunt wrote:

> > I just noticed there's no documentation for 
> > `__builtin_virtual_member_address()` so I'm addressing that.
> > Due to code drift and time I realized that they disagree as to whether they 
> > should take `C*` or `C&` so I'm going to make them both accept either 
> > (existing code means we can't unify on one or the other, but also there's 
> > no real reason to not accept either and simply do the correct thing)
> 
> most of our builtins take pointers. Accepting both seems unwise. people might 
> want to do interesting things in sfinae context and if we accept everything 
> and anything it will end up causing more pain than it alleviates.

@AaronBallman Given we need to keep the reference argument to 
__virtual_member_address, would you like to support both, or remain as 
reference only?

https://github.com/llvm/llvm-project/pull/135469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] ebba554 - [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (#135489)

2025-04-13 Thread via cfe-commits

Author: Phoebe Wang
Date: 2025-04-14T08:54:10+08:00
New Revision: ebba554a3211b0b98d3ae33ba70f9d6ceaab6ad4

URL: 
https://github.com/llvm/llvm-project/commit/ebba554a3211b0b98d3ae33ba70f9d6ceaab6ad4
DIFF: 
https://github.com/llvm/llvm-project/commit/ebba554a3211b0b98d3ae33ba70f9d6ceaab6ad4.diff

LOG: [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (#135489)

According to SDM, they require both VAES/VPCLMULQDQ and AVX10.1 CPUID
bits.

Fixes: #135394

Added: 


Modified: 
clang/test/CodeGen/attr-target-x86.c
llvm/lib/Target/X86/X86.td
llvm/lib/TargetParser/X86TargetParser.cpp

Removed: 




diff  --git a/clang/test/CodeGen/attr-target-x86.c 
b/clang/test/CodeGen/attr-target-x86.c
index c92aad633082f..e5067c1c3b075 100644
--- a/clang/test/CodeGen/attr-target-x86.c
+++ b/clang/test/CodeGen/attr-target-x86.c
@@ -56,7 +56,7 @@ void f_default2(void) {
 __attribute__((target("avx,  sse4.2,  arch=   ivybridge")))
 void f_avx_sse4_2_ivybridge_2(void) {}
 
-// CHECK: [[f_no_aes_ivybridge]] = {{.*}}"target-cpu"="ivybridge" 
"target-features"="+avx,+cmov,+crc32,+cx16,+cx8,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-amx-avx512,-avx10.1-256,-avx10.1-512,-avx10.2-256,-avx10.2-512,-vaes"
+// CHECK: [[f_no_aes_ivybridge]] = {{.*}}"target-cpu"="ivybridge" 
"target-features"="+avx,+cmov,+crc32,+cx16,+cx8,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-vaes"
 __attribute__((target("no-aes, arch=ivybridge")))
 void f_no_aes_ivybridge(void) {}
 
@@ -98,11 +98,11 @@ void f_x86_64_v3(void) {}
 __attribute__((target("arch=x86-64-v4")))
 void f_x86_64_v4(void) {}
 
-// CHECK: [[f_avx10_1_256]] = {{.*}}"target-cpu"="i686" 
"target-features"="+aes,+avx,+avx10.1-256,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+f16c,+fma,+mmx,+pclmul,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave,-amx-avx512,-avx10.1-512,-avx10.2-512,-evex512"
+// CHECK: [[f_avx10_1_256]] = {{.*}}"target-cpu"="i686" 
"target-features"="+avx,+avx10.1-256,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,-amx-avx512,-avx10.1-512,-avx10.2-512,-evex512"
 __attribute__((target("avx10.1-256")))
 void f_avx10_1_256(void) {}
 
-// CHECK: [[f_avx10_1_512]] = {{.*}}"target-cpu"="i686" 
"target-features"="+aes,+avx,+avx10.1-256,+avx10.1-512,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+pclmul,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave"
+// CHECK: [[f_avx10_1_512]] = {{.*}}"target-cpu"="i686" 
"target-features"="+avx,+avx10.1-256,+avx10.1-512,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave"
 __attribute__((target("avx10.1-512")))
 void f_avx10_1_512(void) {}
 
@@ -112,4 +112,4 @@ void f_prefer_256_bit(void) {}
 
 // CHECK: [[f_no_prefer_256_bit]] = 
{{.*}}"target-features"="{{.*}}-prefer-256-bit
 __attribute__((target("no-prefer-256-bit")))
-void f_no_prefer_256_bit(void) {}
\ No newline at end of file
+void f_no_prefer_256_bit(void) {}

diff  --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td
index 38761e1fd7eec..577428cad6d61 100644
--- a/llvm/lib/Target/X86/X86.td
+++ b/llvm/lib/Target/X86/X86.td
@@ -338,7 +338,7 @@ def FeatureAVX10_1 : SubtargetFeature<"avx10.1-256", 
"HasAVX10_1", "true",
   "Support AVX10.1 up to 256-bit 
instruction",
   [FeatureCDI, FeatureVBMI, FeatureIFMA, 
FeatureVNNI,
FeatureBF16, FeatureVPOPCNTDQ, 
FeatureVBMI2, FeatureBITALG,
-   FeatureVAES, FeatureVPCLMULQDQ, 
FeatureFP16]>;
+   FeatureFP16]>;
 def FeatureAVX10_1_512 : SubtargetFeature<"avx10.1-512", "HasAVX10_1_512", 
"true",
   "Support AVX10.1 up to 512-bit 
instruction",
   [FeatureAVX10_1, FeatureEVEX512]>;

diff  --git a/llvm/lib/TargetParser/X86TargetParser.cpp 
b/llvm/lib/TargetParser/X86TargetParser.cpp
index e4b7ed7cf9b61..2ae6dd6b3d1ef 100644
--- a/llvm/lib/TargetParser/X86TargetParser.

[clang] [llvm] [X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (PR #135489)

2025-04-13 Thread Phoebe Wang via cfe-commits

phoebewang wrote:

/cherry-pick 
https://github.com/llvm/llvm-project/commit/ebba554a3211b0b98d3ae33ba70f9d6ceaab6ad4

https://github.com/llvm/llvm-project/pull/135489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` 
running on `systemz-1` while building `clang` at step 6 "test-openmp".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/88/builds/10403


Here is the relevant piece of the build log for the reference

```
Step 6 (test-openmp) failure: test (failure)
 TEST 'libomp :: tasking/issue-94260-2.c' FAILED 

Exit Code: -11

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang 
-fopenmp   -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test 
-L 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
  -fno-omit-frame-pointer -mbackchain -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt
 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c
 -o 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
 -lm -latomic && 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# executed command: 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang 
-fopenmp -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test 
-L 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -fno-omit-frame-pointer -mbackchain -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt
 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c
 -o 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
 -lm -latomic
# executed command: 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -11

--




```



https://github.com/llvm/llvm-project/pull/135147
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 58b5df0 - Clang: Add elementwise minnum/maxnum builtin functions (#129207)

2025-04-13 Thread via cfe-commits

Author: YunQiang Su
Date: 2025-04-14T13:49:32+08:00
New Revision: 58b5df09dc6f899016fc707bf937b36b36934b6d

URL: 
https://github.com/llvm/llvm-project/commit/58b5df09dc6f899016fc707bf937b36b36934b6d
DIFF: 
https://github.com/llvm/llvm-project/commit/58b5df09dc6f899016fc707bf937b36b36934b6d.diff

LOG: Clang: Add elementwise minnum/maxnum builtin functions (#129207)

With https://github.com/llvm/llvm-project/pull/112852, we claimed that
llvm.minnum and llvm.maxnum should treat +0.0>-0.0, while libc doesn't
require fmin(3)/fmax(3) for it.

To make llvm.minnum/llvm.maxnum easy to use, we define the builtin
functions for them, include
__builtin_elementwise_minnum
__builtin_elementwise_maxnum

All of them support _Float16, __bf16, float, double, long double.

Added: 
clang/test/CodeGen/builtin-maxnum-minnum.c

Modified: 
clang/docs/LanguageExtensions.rst
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/Builtins.td
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp

Removed: 




diff  --git a/clang/docs/LanguageExtensions.rst 
b/clang/docs/LanguageExtensions.rst
index 3b8a9cac6587a..971ab50cc9a69 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -818,7 +818,23 @@ of 
diff erent sizes and signs is forbidden in binary and ternary builtins.
  T __builtin_elementwise_fmod(T x, T y) return The floating-point 
remainder of (x/y) whose signfloating point types
 matches the sign of x.
  T __builtin_elementwise_max(T x, T y)  return x or y, whichever is 
larger integer and floating point types
+For floating point types, 
follows semantics of maxNum
+in IEEE 754-2008. See `LangRef
+
`_
+for the comparison.
  T __builtin_elementwise_min(T x, T y)  return x or y, whichever is 
smallerinteger and floating point types
+For floating point types, 
follows semantics of minNum
+in IEEE 754-2008. See `LangRef
+
`_
+for the comparison.
+ T __builtin_elementwise_maxnum(T x, T y)   return x or y, whichever is 
larger. Follows IEEE 754-2008  floating point types
+semantics (maxNum) with 
+0.0>-0.0. See `LangRef
+
`_
+for the comparison.
+ T __builtin_elementwise_minnum(T x, T y)   return x or y, whichever is 
smaller. Follows IEEE 754-2008 floating point types
+semantics (minNum) with 
+0.0>-0.0. See `LangRef
+
`_
+for the comparison.
  T __builtin_elementwise_add_sat(T x, T y)  return the sum of x and y, 
clamped to the range of integer types
 representable values for the 
signed/unsigned integer type.
  T __builtin_elementwise_sub_sat(T x, T y)  return the 
diff erence of x and y, clamped to the range of  integer types

diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 11f62bc881b03..304d9ac3d8ab5 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -191,6 +191,7 @@ Non-comprehensive list of changes in this release
 - Support parsing the `cc` operand modifier and alias it to the `c` modifier 
(#GH127719).
 - Added `__builtin_elementwise_exp10`.
 - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the 
`v_cvt_off_f32_i4` instruction.
+- Added `__builtin_elementwise_minnum` and `__builtin_elementwise_maxnum`.
 
 New Compiler Flags
 --

diff  --git a/clang/include/clang/Basic/Builtins.td 
b/clang/include/clang/Basic/Builtins.td
index 868e5b92acdc9..74a11257b373d 100644
--- a/clang/include/clang/Basic/Builtins.td
+++ b/clang/include/clang/Basic/Builtins.td
@@ -1304,6 +1304,18 @@ def ElementwiseMin : Builtin {
   let Prototype = "void(...)";
 }
 
+def ElementwiseMaxNum : Builtin {
+  let Spellings = ["__builtin_elementwise_maxnum"];
+  let Attributes = [NoThrow, Const, CustomTypeCheck

[clang] Merge similar Clang Thread Safety attributes (PR #135561)

2025-04-13 Thread Aaron Puchert via cfe-commits

https://github.com/aaronpuchert updated 
https://github.com/llvm/llvm-project/pull/135561

>From 372bfceceec7ba618d7651559f1071baacaf2fcc Mon Sep 17 00:00:00 2001
From: Aaron Puchert 
Date: Sun, 13 Apr 2025 22:28:23 +0200
Subject: [PATCH] Merge similar Clang Thread Safety attributes

Some of the old lock-based and new capability-based spellings behave
basically in the same way, so merging them simplifies the code
significantly.

There are two minor functional changes: we only warn (instead of an
error) when the try_acquire_capability attribute is used on something
else than a function. The alternative would have been to produce an
error for the old spelling, but we seem to only warn for all function
attributes, so this is arguably more consistent.

The second change is that we also check the first argument (which is the
value returned for a successful try-acquire) for `this`. But from what I
can tell, this code is defunct anyway at the moment (see #31414).
---
 clang/include/clang/Basic/Attr.td   | 65 +
 clang/lib/AST/ASTImporter.cpp   | 28 ---
 clang/lib/Analysis/ThreadSafety.cpp | 60 ++-
 clang/lib/Sema/SemaDeclAttr.cpp | 55 -
 clang/lib/Sema/SemaDeclCXX.cpp  | 13 ++---
 clang/test/Sema/attr-capabilities.c |  2 +-
 clang/unittests/AST/ASTImporterTest.cpp | 36 --
 7 files changed, 21 insertions(+), 238 deletions(-)

diff --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index fd9e686485552..cff1f12b94999 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -3803,7 +3803,9 @@ def Capability : InheritableAttr {
 
 def AssertCapability : InheritableAttr {
   let Spellings = [Clang<"assert_capability", 0>,
-   Clang<"assert_shared_capability", 0>];
+   Clang<"assert_shared_capability", 0>,
+   GNU<"assert_exclusive_lock">,
+   GNU<"assert_shared_lock">];
   let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
@@ -3811,7 +3813,8 @@ def AssertCapability : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"assert_shared_capability", 0>]>];
+[Clang<"assert_shared_capability", 0>,
+ GNU<"assert_shared_lock">]>];
   let Documentation = [AssertCapabilityDocs];
 }
 
@@ -3834,16 +3837,18 @@ def AcquireCapability : InheritableAttr {
 
 def TryAcquireCapability : InheritableAttr {
   let Spellings = [Clang<"try_acquire_capability", 0>,
-   Clang<"try_acquire_shared_capability", 0>];
-  let Subjects = SubjectList<[Function],
- ErrorDiag>;
+   Clang<"try_acquire_shared_capability", 0>,
+   GNU<"exclusive_trylock_function">,
+   GNU<"shared_trylock_function">];
+  let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
   let ParseArgumentsAsUnevaluated = 1;
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"try_acquire_shared_capability", 0>]>];
+[Clang<"try_acquire_shared_capability", 0>,
+ GNU<"shared_trylock_function">]>];
   let Documentation = [TryAcquireCapabilityDocs];
 }
 
@@ -3933,54 +3938,6 @@ def AcquiredBefore : InheritableAttr {
   let Documentation = [Undocumented];
 }
 
-def AssertExclusiveLock : InheritableAttr {
-  let Spellings = [GNU<"assert_exclusive_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-def AssertSharedLock : InheritableAttr {
-  let Spellings = [GNU<"assert_shared_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-// The first argument is an integer or boolean value specifying the return 
value
-// of a successful lock acquisition.
-def ExclusiveTrylockFunction : InheritableAttr {
-  let Spellings = [GNU<"exclusive_trylock_function">];
-  let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation =

[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-13 Thread Nathan Ridge via cfe-commits

https://github.com/HighCommander4 closed 
https://github.com/llvm/llvm-project/pull/133124
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-13 Thread Nathan Ridge via cfe-commits

HighCommander4 wrote:

Ok, I went ahead and merged it.

https://github.com/llvm/llvm-project/pull/133124
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-13 Thread via cfe-commits

github-actions[bot] wrote:



@ycongal-smile Congratulations on having your first Pull Request (PR) merged 
into the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a 
problem with a build, you may receive a report in an email or a comment on this 
PR.

Please check whether problems have been caused by your change specifically, as 
the builds can include changes from many authors. It is not uncommon for your 
change to be included in a build that fails due to someone else's changes, or 
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself. This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/133124
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-04-13 Thread Yutong Zhu via cfe-commits

YutongZhuu wrote:

> > > But still I feel generate a warning for this case went too far.
> > 
> > 
> > Yeah, that's probably right. Maybe for `-` on a signed operand, we should 
> > just return the original range with the `NonNegative` flag cleared out, and 
> > shouldn't add the extra bit for the `-128 -> 128` edge case. That's not 
> > technically correct, but probably is more useful in practice.
> 
> Hm. That change will reintroduce a false positive warning for:
> 
> ```c++
> bool b(signed char c) {
>   return -c >= 128;
> }
> ```
> 
> ... that this patch fixed. But we don't produce a false positive for `0 - c 
> >= 128`, so I still think what we ought to do here is to make `-c` behave the 
> same way that `0 - c` does.

I don't think I can fix the problem without re-introducing the false positive 
in ``TryGetExprRange``.  By looking at the AST, the only difference is that 
```c++
unsigned char b = -a 
```
has a implCast to unsigned char right before the unary operator but the false 
positive case does not. By the time that the expression is passed into 
``TryGetExprRange``,  the information about the implCast has already lost (And 
I cannot find any APIs that is able to get the parent expression or something 
like that). I think it would be better to re-introduce the false positive 
because I think having the implicit-int-conversion warning sounds more 
unacceptable. Or you have any other suggestions on differentiating between the 
two cases?

https://github.com/llvm/llvm-project/pull/126846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-13 Thread Oliver Hunt via cfe-commits

ojhunt wrote:

> > I just noticed there's no documentation for 
> > `__builtin_virtual_member_address()` so I'm addressing that.
> > Due to code drift and time I realized that they disagree as to whether they 
> > should take `C*` or `C&` so I'm going to make them both accept either 
> > (existing code means we can't unify on one or the other, but also there's 
> > no real reason to not accept either and simply do the correct thing)
> 
> most of our builtins take pointers. Accepting both seems unwise. people might 
> want to do interesting things in sfinae context and if we accept everything 
> and anything it will end up causing more pain than it alleviates.

Hmmm, I'll revert to only supporting pointers in ``get_vtable_pointer`` but 
there's existing code dependent on the non-pointer argument to 
virtual_member_address which makes it difficult to switch to having a pointer 
argument.

https://github.com/llvm/llvm-project/pull/135469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-13 Thread Oleksandr T. via cfe-commits

https://github.com/a-tarasyuk updated 
https://github.com/llvm/llvm-project/pull/135573

>From 05125bafc45755624973feba0f4e6c2050fad36f Mon Sep 17 00:00:00 2001
From: Oleksandr Tarasiuk 
Date: Mon, 14 Apr 2025 01:37:05 +0300
Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes
 inside lambdas

---
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/lib/Sema/SemaStmt.cpp   | 14 --
 clang/test/SemaCXX/warn-loop-analysis.cpp | 15 +++
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 5217e04b5e83f..77d15d798097b 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -319,6 +319,8 @@ Improvements to Clang's diagnostics
 - ``-Wc++98-compat`` no longer diagnoses use of ``__auto_type`` or
   ``decltype(auto)`` as though it was the extension for ``auto``. (#GH47900)
 
+- The ``-Wloop-analysis`` warning now handles variable modifications inside 
lambda expressions (#GH132038).
+
 Improvements to Clang's time-trace
 --
 
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index e1b9ccc693bd5..a1718d5a549e4 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -1995,9 +1995,19 @@ namespace {
 }
 
 void VisitDeclRefExpr(DeclRefExpr *E) {
-  if (VarDecl *VD = dyn_cast(E->getDecl()))
+  if (VarDecl *VD = dyn_cast(E->getDecl())) {
 if (Decls.count(VD))
   FoundDecl = true;
+  } else {
+if (CXXMethodDecl *MD = dyn_cast(E->getDecl()))
+  if (isLambdaCallOperator(MD))
+Visit(MD->getBody());
+  }
+}
+
+void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
+  if (Expr *Callee = E->getCallee())
+Visit(Callee);
 }
 
 void VisitPseudoObjectExpr(PseudoObjectExpr *POE) {
@@ -2014,7 +2024,7 @@ namespace {
 
 bool FoundDeclInUse() { return FoundDecl; }
 
-  };  // end class DeclMatcher
+  }; // end class DeclMatcher
 
   void CheckForLoopConditionalStatement(Sema &S, Expr *Second,
 Expr *Third, Stmt *Body) {
diff --git a/clang/test/SemaCXX/warn-loop-analysis.cpp 
b/clang/test/SemaCXX/warn-loop-analysis.cpp
index 324dd386292ac..cfed3c23a2e9e 100644
--- a/clang/test/SemaCXX/warn-loop-analysis.cpp
+++ b/clang/test/SemaCXX/warn-loop-analysis.cpp
@@ -299,3 +299,18 @@ void test10() {
   for (auto[i, j, k] = arr; i < a; ++i) { }
   for (auto[i, j, k] = arr; i < a; ++arr[0]) { }
 };
+
+extern void foo(int);
+void test11() {
+  int a = 0;
+  auto incr_a = [&a]() { ++a; };
+
+  for (int b = 10; a <= b; incr_a())
+foo(a);
+
+  for (int b = 10; a <= b;)
+incr_a();
+
+  for (int b = 10; a <= b; [&a]() { ++a; }()) { }
+  for (int b = 10; a <= b; [&a]() { }()) { } // expected-warning {{variables 
'a' and 'b' used in loop condition not modified in loop body}}
+}

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder 
`amdgpu-offload-ubuntu-22-cmake-build-only` running on `rocm-docker-ubu-22` 
while building `clang` at step 4 "annotate".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/203/builds/7536


Here is the relevant piece of the build log for the reference

```
Step 4 (annotate) failure: 
'../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py 
--jobs=32' (failure)
...
[1032/7775] Building GPUOpsDialect.h.inc...
[1033/7775] Building IndexOpsDialect.cpp.inc...
[1034/7775] Building IRDL.cpp.inc...
[1035/7775] Building IRDL.h.inc...
[1036/7775] Building IRDLDialect.cpp.inc...
[1037/7775] Building ArmSMEIntrinsicOps.cpp.inc...
[1038/7775] Building ArmSMEIntrinsicOps.h.inc...
[1039/7775] Building IndexOpsDialect.h.inc...
[1040/7775] Building IndexOpsTypes.h.inc...
[1041/7775] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
ccache /usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_DEBUG 
-D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/tools/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/lib/Support
 
-I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/include
 
-I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/tools/clang/include
 -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/include 
-I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/include
 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden 
-Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings 
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess 
-Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-UNDEBUG -std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
[1042/7775] Building IndexOps.cpp.inc...
[1043/7775] Building IndexOps.h.inc...
[1044/7775] Building IndexOpsTypes.cpp.inc...
[1045/7775] Building IRDLTypes.cpp.inc...
[1046/7775] Building Passes.capi.cpp.inc...
[1047/7775] Building Passes.capi.h.inc...
[1048/7775] Building GPUOps.cpp.inc...
[1049/7775] Building Passes.h.inc...
[1050/7775] Building IRDLDialect.h.inc...
[1051/7775] Building IRDLTypes.h.inc...
[1052/7775] Building ParallelLoopMapperEnums.cpp.inc...
[1053/7775] Building IRDLInterfaces.cpp.inc...
[1054/7775] Building ParallelLoopMapperEnums.h.inc...
[1055/7775] Building IRDLInterfaces.h.inc...
[1056/7775] Linking CXX shared library lib/libLLVMDebugInfoBTF.so.21.0git
[1057/7775] Building RelayoutOpInterface.cpp.inc...
[1058/7775] Building RelayoutOpInterface.h.inc...
[1059/7775] Building DeviceMappingAttrInterface.h.inc...
[1060/7775] Building DeviceMappingAttrInterface.cpp.inc...
[1061/7775] Building DeviceMappingAttributes.cpp.inc...
[1062/7775] Building DeviceMappingAttributes.h.inc...
[1063/7775] Linking CXX shared library lib/libLLVMOrcShared.so.21.0git
[1064/7775] Linking CXX shared library lib/libLLVMRemarks.so.21.0git
[1065/7775] Building LinalgMatchOps.cpp.inc...
[1066/7775] Building LLVMOpsDialect.cpp.inc...
[1067/7775] Building LLVMOpsAttrDefs.h.inc...
[1068/7775] Build

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-04-13 Thread LLVM Continuous Integration via cfe-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `publish-sphinx-docs` 
running on `as-worker-4` while building `clang` at step 5 
"build-docs-llvm-html-docs-clang-html-docs-clang...".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/45/builds/9


Here is the relevant piece of the build log for the reference

```
Step 5 (build-docs-llvm-html-docs-clang-html-docs-clang...) failure: build 
(failure)
...
1012.709 [2262/24/3033] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o
1012.720 [2261/24/3034] Generating SBLanguages.h from Dwarf.def
1012.895 [2260/24/3035] Linking CXX executable bin/mlir-tblgen
1012.947 [2259/24/3036] Building FIRLangRef.md...
1012.956 [2258/24/3037] Generating ../../../../docs/Dialect/FIRLangRef.md
1012.963 [2257/24/3038] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o
1012.970 [2256/24/3039] cd 
/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/docs && 
/usr/local/bin/cmake -E remove_directory 
/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/docs/html
1012.982 [2255/24/3040] cd 
/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/flang/docs && 
/usr/local/bin/cmake -E copy_directory 
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/flang/docs 
/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/flang/docs/Source
1013.021 [2254/24/3041] Running utility command for copy-flang-src-docs
1013.499 [2253/24/3042] Building CXX object 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
FAILED: 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 
/usr/bin/c++ -DCLANG_EXPORTS -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/clang/lib/Support 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/lib/Support 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/include 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/clang/include 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/build/include 
-I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/include 
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
-Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color 
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
-fno-strict-aliasing -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti 
-std=c++17 -MD -MT 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -MF 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o.d
 -o 
tools/clang/lib/Support/CMakeFiles/obj.clangSupport.dir/RISCVVIntrinsicUtils.cpp.o
 -c 
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp
In file included from 
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/lib/Support/RISCVVIntrinsicUtils.cpp:9:
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:541:22:
 error: declaration of ‘clang::RISCV::RequiredExtensions 
clang::RISCV::RVVIntrinsicRecord::RequiredExtensions’ changes meaning of 
‘RequiredExtensions’ [-fpermissive]
  541 |   RequiredExtensions RequiredExtensions;
  |  ^~
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h:515:8:
 note: ‘RequiredExtensions’ declared here as ‘struct 
clang::RISCV::RequiredExtensions’
  515 | struct RequiredExtensions {
  |^~
1013.624 [2253/23/3043] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangTypeNodesEmitter.cpp.o
1013.686 [2253/22/3044] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpcodesEmitter.cpp.o
1014.411 [2253/21/3045] Building CXX object 
tools/lldb/utils/TableGen/CMakeFiles/lldb-tblgen.dir/LLDBPropertyDefEmitter.cpp.o
1014.465 [2253/20/3046] Generating html Sphinx documentation for polly into 
"/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/polly/docs/html"
1014.535 [2253/19/3047] Building CXX object 
tools/lldb/utils/TableGen/CMakeFiles/lldb-tblgen.dir/LLDBTableGenUtils.cpp.o
1014.577 [2253/18/3048] Building CXX object 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir/RISCVVEmitter.cpp.o
FAILED: 
tools/clang/utils/TableGen/CMakeFiles/clang-tblgen.dir

[clang] 21ff45d - Revert "[RISCV][NFC] Make generated intrinsic records more human-readable (#133710)"

2025-04-13 Thread Wang Pengcheng via cfe-commits

Author: Wang Pengcheng
Date: 2025-04-14T12:56:33+08:00
New Revision: 21ff45dea1601d6d12438b5201ff09b8726899be

URL: 
https://github.com/llvm/llvm-project/commit/21ff45dea1601d6d12438b5201ff09b8726899be
DIFF: 
https://github.com/llvm/llvm-project/commit/21ff45dea1601d6d12438b5201ff09b8726899be.diff

LOG: Revert "[RISCV][NFC] Make generated intrinsic records more human-readable 
(#133710)"

This reverts commit d0cf5cd5f9790dc21396936d076389c3be1a9599.

Error: "declaration of ‘clang::RISCV::RequiredExtensions
{anonymous}::SemaRecord::RequiredExtensions’ changes meaning of
‘RequiredExtensions’ [-fpermissive]"

Added: 


Modified: 
clang/include/clang/Support/RISCVVIntrinsicUtils.h
clang/lib/Sema/SemaRISCV.cpp
clang/lib/Support/RISCVVIntrinsicUtils.cpp
clang/utils/TableGen/RISCVVEmitter.cpp

Removed: 




diff  --git a/clang/include/clang/Support/RISCVVIntrinsicUtils.h 
b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index dd0817f225258..8f2a4f54a1b7f 100644
--- a/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -11,7 +11,6 @@
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/BitmaskEnum.h"
-#include "llvm/ADT/Bitset.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include 
@@ -377,8 +376,6 @@ enum PolicyScheme : uint8_t {
   HasPolicyOperand,
 };
 
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS);
-
 // TODO refactor RVVIntrinsic class design after support all intrinsic
 // combination. This represents an instantiation of an intrinsic with a
 // particular type and prototype
@@ -510,23 +507,6 @@ enum RVVRequire {
   RVV_REQ_NUM,
 };
 
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require);
-
-struct RequiredExtensions {
-  llvm::Bitset Bits;
-  RequiredExtensions() {}
-  RequiredExtensions(std::initializer_list Init) {
-for (auto I : Init)
-  Bits.set(I);
-  }
-
-  void set(unsigned I) { Bits.set(I); }
-  bool operator[](unsigned I) const { return Bits[I]; }
-};
-
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
-  const RequiredExtensions &Exts);
-
 // Raw RVV intrinsic info, used to expand later.
 // This struct is highly compact for minimized code size.
 struct RVVIntrinsicRecord {
@@ -538,7 +518,7 @@ struct RVVIntrinsicRecord {
   const char *OverloadedName;
 
   // Required target features for this intrinsic.
-  RequiredExtensions RequiredExtensions;
+  uint32_t RequiredExtensions[(RVV_REQ_NUM + 31) / 32];
 
   // Prototype for this intrinsic, index of RVVSignatureTable.
   uint16_t PrototypeIndex;

diff  --git a/clang/lib/Sema/SemaRISCV.cpp b/clang/lib/Sema/SemaRISCV.cpp
index b9f843b1920a1..746609604d1ba 100644
--- a/clang/lib/Sema/SemaRISCV.cpp
+++ b/clang/lib/Sema/SemaRISCV.cpp
@@ -232,7 +232,8 @@ void RISCVIntrinsicManagerImpl::ConstructRVVIntrinsics(
   for (auto &Record : Recs) {
 // Check requirements.
 if (llvm::any_of(FeatureCheckList, [&](const auto &Item) {
-  return Record.RequiredExtensions[Item.second] &&
+  return ((Record.RequiredExtensions[Item.second / 32] &
+   (1U << (Item.second % 32))) != 0) &&
  !TI.hasFeature(Item.first);
 }))
   continue;

diff  --git a/clang/lib/Support/RISCVVIntrinsicUtils.cpp 
b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
index ee4d1e88e0ab8..e44fbb0181830 100644
--- a/clang/lib/Support/RISCVVIntrinsicUtils.cpp
+++ b/clang/lib/Support/RISCVVIntrinsicUtils.cpp
@@ -1196,91 +1196,36 @@ SmallVector 
parsePrototypes(StringRef Prototypes) {
   return PrototypeDescriptors;
 }
 
-#define STRINGIFY(NAME)
\
-  case NAME:   
\
-OS << #NAME;   
\
-break;
-
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS) {
-  switch (PS) {
-STRINGIFY(SchemeNone)
-STRINGIFY(HasPassthruOperand)
-STRINGIFY(HasPolicyOperand)
-  }
-  return OS;
-}
-
-llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
-  switch (Require) {
-STRINGIFY(RVV_REQ_RV64)
-STRINGIFY(RVV_REQ_Zvfhmin)
-STRINGIFY(RVV_REQ_Xsfvcp)
-STRINGIFY(RVV_REQ_Xsfvfnrclipxfqf)
-STRINGIFY(RVV_REQ_Xsfvfwmaccqqq)
-STRINGIFY(RVV_REQ_Xsfvqmaccdod)
-STRINGIFY(RVV_REQ_Xsfvqmaccqoq)
-STRINGIFY(RVV_REQ_Zvbb)
-STRINGIFY(RVV_REQ_Zvbc)
-STRINGIFY(RVV_REQ_Zvkb)
-STRINGIFY(RVV_REQ_Zvkg)
-STRINGIFY(RVV_REQ_Zvkned)
-STRINGIFY(RVV_REQ_Zvknha)
-STRINGIFY(RVV_REQ_Zvknhb)
-STRINGIFY(RVV_REQ_Zvksed)
-STRINGIFY(RVV_REQ_Zvksh)
-STRINGIFY(RVV_REQ_Zvfbfwma)
-STRINGIFY(RVV_REQ_Zvfbfmin)
-STRINGIFY(RVV_REQ_Zvfh)
-STRINGIFY(RVV_REQ_Experimental)
-  default:
-llvm_unreachable("

[clang-tools-extra] [clang-tidy] Improve `bugprone-exception-escape`: add stacktrace of escaped exception (PR #134375)

2025-04-13 Thread Baranov Victor via cfe-commits


@@ -80,13 +80,46 @@ void ExceptionEscapeCheck::check(const 
MatchFinder::MatchResult &Result) {
   if (!MatchedDecl)
 return;
 
-  if (Tracer.analyze(MatchedDecl).getBehaviour() ==
-  utils::ExceptionAnalyzer::State::Throwing)
-// FIXME: We should provide more information about the exact location where
-// the exception is thrown, maybe the full path the exception escapes
-diag(MatchedDecl->getLocation(), "an exception may be thrown in function "
- "%0 which should not throw exceptions")
-<< MatchedDecl;
+  const utils::ExceptionAnalyzer::ExceptionInfo Info =
+  Tracer.analyze(MatchedDecl);
+
+  if (Info.getBehaviour() != utils::ExceptionAnalyzer::State::Throwing) {
+return;
+  }
+
+  diag(MatchedDecl->getLocation(), "an exception may be thrown in function "
+   "%0 which should not throw exceptions")
+  << MatchedDecl;
+
+  const utils::ExceptionAnalyzer::ExceptionInfo::ThrowInfo ThrowInfo =
+  Info.getExceptions().begin()->getSecond();
+
+  if (ThrowInfo.Loc.isInvalid()) {
+return;
+  }
+
+  // FIXME: We should provide exact position of functions calls, not only call
+  // stack of thrown exception.
+  const utils::ExceptionAnalyzer::CallStack &Stack = ThrowInfo.Stack;
+  diag(Stack.front()->getLocation(),
+   "example of unhandled exception throw stack, starting from function %0",

vbvictor wrote:

Is this a better wording?
`throw stack of unhandled exception, starting from function %0`
Initially, I used `example` as a synonym to `may` word that was used in main 
diagnostic of this check.

https://github.com/llvm/llvm-project/pull/134375
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Sema] Use llvm::erase_if (NFC) (PR #135574)

2025-04-13 Thread Kazu Hirata via cfe-commits

https://github.com/kazutakahirata closed 
https://github.com/llvm/llvm-project/pull/135574
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Sema] Use llvm::erase_if (NFC) (PR #135574)

2025-04-13 Thread Kazu Hirata via cfe-commits

https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/135574

None

>From 085ac380032ba50250a489327986bd7a0dce951e Mon Sep 17 00:00:00 2001
From: Kazu Hirata 
Date: Sun, 13 Apr 2025 15:32:33 -0700
Subject: [PATCH] [Sema] Use llvm::erase_if (NFC)

---
 clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 --
 clang/lib/Sema/TreeTransform.h | 11 ---
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 
b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 108d7e1dbaebc..5c80077f294c6 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1280,12 +1280,10 @@ void 
OpenACCDeclClauseInstantiator::VisitDevicePtrClause(
 const OpenACCDevicePtrClause &C) {
   llvm::SmallVector VarList = VisitVarList(C.getVarList());
   // Ensure each var is a pointer type.
-  VarList.erase(std::remove_if(VarList.begin(), VarList.end(),
-   [&](Expr *E) {
- return 
SemaRef.OpenACC().CheckVarIsPointerType(
- OpenACCClauseKind::DevicePtr, E);
-   }),
-VarList.end());
+  llvm::erase_if(VarList, [&](Expr *E) {
+return 
SemaRef.OpenACC().CheckVarIsPointerType(OpenACCClauseKind::DevicePtr,
+   E);
+  });
   ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
   if (SemaRef.OpenACC().CheckDeclareClause(ParsedClause,
OpenACCModifierKind::Invalid))
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 21e250e172d5e..bb58ec49612c8 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -11992,13 +11992,10 @@ void 
OpenACCClauseTransform::VisitDetachClause(
   llvm::SmallVector VarList = VisitVarList(C.getVarList());
 
   // Ensure each var is a pointer type.
-  VarList.erase(
-  std::remove_if(VarList.begin(), VarList.end(),
- [&](Expr *E) {
-   return Self.getSema().OpenACC().CheckVarIsPointerType(
-   OpenACCClauseKind::Detach, E);
- }),
-  VarList.end());
+  llvm::erase_if(VarList, [&](Expr *E) {
+return Self.getSema().OpenACC().CheckVarIsPointerType(
+OpenACCClauseKind::Detach, E);
+  });
 
   ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
   NewClause = OpenACCDetachClause::Create(

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-13 Thread Jonathan Thackray via cfe-commits


@@ -3593,6 +3578,25 @@ class sme_tmopa_32b opc, RegisterOperand zn_ty, 
RegisterOperand zm_ty, s
   let Constraints = "$ZAda = $_ZAda";
 }
 
+multiclass sme_tmopa_16b opc, RegisterOperand zn_ty, RegisterOperand 
zm_ty, ValueType vt, string mnemonic, string intrinsic> {
+  def NAME : sme_int_sparse_outer_product_i16, 
SMEPseudo2Instr {
+ let Uses = [FPMR, FPCR];
+  }
+
+  def NAME # _PSEUDO : sme_sparse_outer_product_pseudo, SMEPseudo2Instr;
+
+  def : SME2_ZA_TMOP_Pat(intrinsic), 
timm32_0_1, timm32_0_3, vt>;
+}
+
+multiclass sme_tmopa_32b opc, RegisterOperand zn_ty, RegisterOperand 
zm_ty, ValueType vt, string mnemonic, string intrinsic> {
+  def NAME : sme_int_sparse_outer_product_i32, 
SMEPseudo2Instr {
+ let Uses = [FPMR, FPCR];
+  }
+
+  def NAME # _PSEUDO : sme_sparse_outer_product_pseudo, SMEPseudo2Instr;
+
+  def : SME2_ZA_TMOP_Pat(intrinsic), 
timm32_0_1, timm32_0_3, vt>;

jthackray wrote:

Thanks, updated.

https://github.com/llvm/llvm-project/pull/135145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-13 Thread Jonathan Thackray via cfe-commits


@@ -3107,6 +3107,23 @@ let TargetPrefix = "aarch64" in {
 }
   }
 
+  class SME_OuterProduct_TMOP_Intrinsic
+ : DefaultAttrsIntrinsic<[],
+ [llvm_i32_ty,
+  llvm_anyvector_ty,
+  LLVMMatchType<0>,
+  LLVMMatchType<0>,
+  llvm_nxv16i8_ty,
+  llvm_i32_ty],
+ [ImmArg>, ImmArg>,
+  IntrNoMem, IntrHasSideEffects]>;

jthackray wrote:

Thanks. I've changed this, but also had to add `let mayStore = 1;` to make this 
work.

https://github.com/llvm/llvm-project/pull/135145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-13 Thread Jonathan Thackray via cfe-commits


@@ -3593,6 +3578,25 @@ class sme_tmopa_32b opc, RegisterOperand zn_ty, 
RegisterOperand zm_ty, s
   let Constraints = "$ZAda = $_ZAda";
 }
 
+multiclass sme_tmopa_16b opc, RegisterOperand zn_ty, RegisterOperand 
zm_ty, ValueType vt, string mnemonic, string intrinsic> {
+  def NAME : sme_int_sparse_outer_product_i16, 
SMEPseudo2Instr {
+ let Uses = [FPMR, FPCR];

jthackray wrote:

Thanks, now fixed.

https://github.com/llvm/llvm-project/pull/135145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Merge similar Clang Thread Safety attributes (PR #135561)

2025-04-13 Thread Aaron Puchert via cfe-commits

https://github.com/aaronpuchert created 
https://github.com/llvm/llvm-project/pull/135561

Some of the old lock-based and new capability-based spellings behave basically 
in the same way, so merging them simplifies the code significantly.

There are two minor functional changes: we only warn (instead of an error) when 
the try_acquire_capability attribute is used on something else than a function. 
The alternative would have been to produce an error for the old spelling, but 
we seem to only warn for all function attributes, so this is arguably more 
consistent.

The second change is that we also check the first argument (which is the value 
returned for a successful try-acquire) for `this`. But from what I can tell, 
this code is defunct anyway at the moment (see #31414).

>From 50e34c3c269776f0b22d7754c52e27f786b6f764 Mon Sep 17 00:00:00 2001
From: Aaron Puchert 
Date: Sun, 13 Apr 2025 22:28:23 +0200
Subject: [PATCH] Merge similar Clang Thread Safety attributes

Some of the old lock-based and new capability-based spellings behave
basically in the same way, so merging them simplifies the code
significantly.

There are two minor functional changes: we only warn (instead of an
error) when the try_acquire_capability attribute is used on something
else than a function. The alternative would have been to produce an
error for the old spelling, but we seem to only warn for all function
attributes, so this is arguably more consistent.

The second change is that we also check the first argument (which is the
value returned for a successful try-acquire) for `this`. But from what I
can tell, this code is defunct anyway at the moment (see #31414).
---
 clang/include/clang/Basic/Attr.td   | 65 +
 clang/lib/AST/ASTImporter.cpp   | 28 -
 clang/lib/Analysis/ThreadSafety.cpp | 60 +++---
 clang/lib/Sema/SemaDeclAttr.cpp | 55 
 clang/lib/Sema/SemaDeclCXX.cpp  | 13 ++
 clang/test/Sema/attr-capabilities.c |  2 +-
 6 files changed, 21 insertions(+), 202 deletions(-)

diff --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index fd9e686485552..cff1f12b94999 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -3803,7 +3803,9 @@ def Capability : InheritableAttr {
 
 def AssertCapability : InheritableAttr {
   let Spellings = [Clang<"assert_capability", 0>,
-   Clang<"assert_shared_capability", 0>];
+   Clang<"assert_shared_capability", 0>,
+   GNU<"assert_exclusive_lock">,
+   GNU<"assert_shared_lock">];
   let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
@@ -3811,7 +3813,8 @@ def AssertCapability : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"assert_shared_capability", 0>]>];
+[Clang<"assert_shared_capability", 0>,
+ GNU<"assert_shared_lock">]>];
   let Documentation = [AssertCapabilityDocs];
 }
 
@@ -3834,16 +3837,18 @@ def AcquireCapability : InheritableAttr {
 
 def TryAcquireCapability : InheritableAttr {
   let Spellings = [Clang<"try_acquire_capability", 0>,
-   Clang<"try_acquire_shared_capability", 0>];
-  let Subjects = SubjectList<[Function],
- ErrorDiag>;
+   Clang<"try_acquire_shared_capability", 0>,
+   GNU<"exclusive_trylock_function">,
+   GNU<"shared_trylock_function">];
+  let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
   let ParseArgumentsAsUnevaluated = 1;
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"try_acquire_shared_capability", 0>]>];
+[Clang<"try_acquire_shared_capability", 0>,
+ GNU<"shared_trylock_function">]>];
   let Documentation = [TryAcquireCapabilityDocs];
 }
 
@@ -3933,54 +3938,6 @@ def AcquiredBefore : InheritableAttr {
   let Documentation = [Undocumented];
 }
 
-def AssertExclusiveLock : InheritableAttr {
-  let Spellings = [GNU<"assert_exclusive_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-def AssertSharedLock : InheritableAttr {
-  let Spellings = [GNU<"assert_shared_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlread

[clang] [clang][CGObjC] Sign the v-table pointer in ObjC exception RTTI. (PR #135562)

2025-04-13 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Oliver Hunt (ojhunt)


Changes

If clang is configured to apply pointer authentication to type_info's vtable 
pointer we
ensure that the selected schema is applied to the RTTI objects generated for 
objc++.

---
Full diff: https://github.com/llvm/llvm-project/pull/135562.diff


5 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+1) 
- (modified) clang/include/clang/CodeGen/ConstantInitBuilder.h (+3) 
- (modified) clang/lib/CodeGen/CGObjCMac.cpp (+18-2) 
- (modified) clang/lib/CodeGen/ConstantInitBuilder.cpp (+12) 
- (added) clang/test/CodeGenObjC/ptrauth-attr-exception.m (+16) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 11f62bc881b03..67fef2fa0c37f 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -191,6 +191,7 @@ Non-comprehensive list of changes in this release
 - Support parsing the `cc` operand modifier and alias it to the `c` modifier 
(#GH127719).
 - Added `__builtin_elementwise_exp10`.
 - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the 
`v_cvt_off_f32_i4` instruction.
+- Support authenticated ``type_info`` vtable pointers in Objective-C++
 
 New Compiler Flags
 --
diff --git a/clang/include/clang/CodeGen/ConstantInitBuilder.h 
b/clang/include/clang/CodeGen/ConstantInitBuilder.h
index 28d4764b6d60b..a7424abbc07eb 100644
--- a/clang/include/clang/CodeGen/ConstantInitBuilder.h
+++ b/clang/include/clang/CodeGen/ConstantInitBuilder.h
@@ -206,6 +206,9 @@ class ConstantAggregateBuilderBase {
   void addSignedPointer(llvm::Constant *Pointer,
 const PointerAuthSchema &Schema, GlobalDecl CalleeDecl,
 QualType CalleeType);
+  void addSignedPointer(llvm::Constant *Pointer, unsigned Key,
+bool UseAddressDiscrimination,
+llvm::ConstantInt *OtherDiscriminator);
 
   /// Add a null pointer of a specific type.
   void addNullPointer(llvm::PointerType *ptrTy) {
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 1f11347b81411..e854f6b5920c8 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -7676,10 +7676,26 @@ CGObjCNonFragileABIMac::GetInterfaceEHType(const 
ObjCInterfaceDecl *ID,
   }
 
   llvm::Value *VTableIdx = llvm::ConstantInt::get(CGM.Int32Ty, 2);
+  llvm::Constant *VTablePtr = llvm::ConstantExpr::getInBoundsGetElementPtr(
+  VTableGV->getValueType(), VTableGV, VTableIdx);
+
   ConstantInitBuilder builder(CGM);
   auto values = builder.beginStruct(ObjCTypes.EHTypeTy);
-  values.add(llvm::ConstantExpr::getInBoundsGetElementPtr(
-  VTableGV->getValueType(), VTableGV, VTableIdx));
+
+  if (auto &Schema =
+  CGM.getCodeGenOpts().PointerAuth.CXXTypeInfoVTablePointer) {
+uint32_t discrimination = 0;
+if (Schema.hasOtherDiscrimination()) {
+  assert(Schema.getOtherDiscrimination() ==
+ PointerAuthSchema::Discrimination::Constant);
+  discrimination = Schema.getConstantDiscrimination();
+}
+values.addSignedPointer(
+VTablePtr, Schema.getKey(), Schema.isAddressDiscriminated(),
+llvm::ConstantInt::get(CGM.IntPtrTy, discrimination));
+  } else {
+values.add(VTablePtr);
+  }
   values.add(GetClassName(ClassName));
   values.add(GetClassGlobal(ID, /*metaclass*/ false, NotForDefinition));
 
diff --git a/clang/lib/CodeGen/ConstantInitBuilder.cpp 
b/clang/lib/CodeGen/ConstantInitBuilder.cpp
index ce1fe137c1919..c5b1ad3a07235 100644
--- a/clang/lib/CodeGen/ConstantInitBuilder.cpp
+++ b/clang/lib/CodeGen/ConstantInitBuilder.cpp
@@ -314,3 +314,15 @@ void ConstantAggregateBuilderBase::addSignedPointer(
   Pointer, Schema, StorageAddress, CalleeDecl, CalleeType);
   add(SignedPointer);
 }
+
+void ConstantAggregateBuilderBase::addSignedPointer(
+llvm::Constant *Pointer, unsigned Key, bool UseAddressDiscrimination,
+llvm::ConstantInt *OtherDiscriminator) {
+  llvm::Constant *StorageAddress = nullptr;
+  if (UseAddressDiscrimination)
+StorageAddress = getAddrOfCurrentPosition(Pointer->getType());
+
+  llvm::Constant *SignedPointer = Builder.CGM.getConstantSignedPointer(
+  Pointer, Key, StorageAddress, OtherDiscriminator);
+  add(SignedPointer);
+}
diff --git a/clang/test/CodeGenObjC/ptrauth-attr-exception.m 
b/clang/test/CodeGenObjC/ptrauth-attr-exception.m
new file mode 100644
index 0..1a17828b927da
--- /dev/null
+++ b/clang/test/CodeGenObjC/ptrauth-attr-exception.m
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm 
-fexceptions -fobjc-exceptions -o - %s | FileCheck %s
+
+__attribute__((objc_root_class))
+@interface Root {
+  Class isa;
+}
+@end
+
+__attribute__((objc_exception))
+@interface A : Root
+@end
+
+@implementation A
+@end
+
+// CHECK: @"OBJC_EHTYPE_$_A" = global {{%.*}} { ptr ptrauth (ptr getelementptr 
inbounds (ptr, ptr @objc_ehtype_vt

[clang] [clang][CGObjC] Sign the v-table pointer in ObjC exception RTTI. (PR #135562)

2025-04-13 Thread Oliver Hunt via cfe-commits

https://github.com/ojhunt created 
https://github.com/llvm/llvm-project/pull/135562

If clang is configured to apply pointer authentication to type_info's vtable 
pointer we
ensure that the selected schema is applied to the RTTI objects generated for 
objc++.

>From 5dc1e5fbb57f88e412e044605d8fe30a66255a35 Mon Sep 17 00:00:00 2001
From: Oliver Hunt 
Date: Sun, 13 Apr 2025 13:21:49 -0700
Subject: [PATCH] [clang][CGObjC] Sign the v-table pointer in ObjC exception
 RTTI.

---
 clang/docs/ReleaseNotes.rst   |  1 +
 .../clang/CodeGen/ConstantInitBuilder.h   |  3 +++
 clang/lib/CodeGen/CGObjCMac.cpp   | 20 +--
 clang/lib/CodeGen/ConstantInitBuilder.cpp | 12 +++
 .../test/CodeGenObjC/ptrauth-attr-exception.m | 16 +++
 5 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 clang/test/CodeGenObjC/ptrauth-attr-exception.m

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 11f62bc881b03..67fef2fa0c37f 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -191,6 +191,7 @@ Non-comprehensive list of changes in this release
 - Support parsing the `cc` operand modifier and alias it to the `c` modifier 
(#GH127719).
 - Added `__builtin_elementwise_exp10`.
 - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the 
`v_cvt_off_f32_i4` instruction.
+- Support authenticated ``type_info`` vtable pointers in Objective-C++
 
 New Compiler Flags
 --
diff --git a/clang/include/clang/CodeGen/ConstantInitBuilder.h 
b/clang/include/clang/CodeGen/ConstantInitBuilder.h
index 28d4764b6d60b..a7424abbc07eb 100644
--- a/clang/include/clang/CodeGen/ConstantInitBuilder.h
+++ b/clang/include/clang/CodeGen/ConstantInitBuilder.h
@@ -206,6 +206,9 @@ class ConstantAggregateBuilderBase {
   void addSignedPointer(llvm::Constant *Pointer,
 const PointerAuthSchema &Schema, GlobalDecl CalleeDecl,
 QualType CalleeType);
+  void addSignedPointer(llvm::Constant *Pointer, unsigned Key,
+bool UseAddressDiscrimination,
+llvm::ConstantInt *OtherDiscriminator);
 
   /// Add a null pointer of a specific type.
   void addNullPointer(llvm::PointerType *ptrTy) {
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 1f11347b81411..e854f6b5920c8 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -7676,10 +7676,26 @@ CGObjCNonFragileABIMac::GetInterfaceEHType(const 
ObjCInterfaceDecl *ID,
   }
 
   llvm::Value *VTableIdx = llvm::ConstantInt::get(CGM.Int32Ty, 2);
+  llvm::Constant *VTablePtr = llvm::ConstantExpr::getInBoundsGetElementPtr(
+  VTableGV->getValueType(), VTableGV, VTableIdx);
+
   ConstantInitBuilder builder(CGM);
   auto values = builder.beginStruct(ObjCTypes.EHTypeTy);
-  values.add(llvm::ConstantExpr::getInBoundsGetElementPtr(
-  VTableGV->getValueType(), VTableGV, VTableIdx));
+
+  if (auto &Schema =
+  CGM.getCodeGenOpts().PointerAuth.CXXTypeInfoVTablePointer) {
+uint32_t discrimination = 0;
+if (Schema.hasOtherDiscrimination()) {
+  assert(Schema.getOtherDiscrimination() ==
+ PointerAuthSchema::Discrimination::Constant);
+  discrimination = Schema.getConstantDiscrimination();
+}
+values.addSignedPointer(
+VTablePtr, Schema.getKey(), Schema.isAddressDiscriminated(),
+llvm::ConstantInt::get(CGM.IntPtrTy, discrimination));
+  } else {
+values.add(VTablePtr);
+  }
   values.add(GetClassName(ClassName));
   values.add(GetClassGlobal(ID, /*metaclass*/ false, NotForDefinition));
 
diff --git a/clang/lib/CodeGen/ConstantInitBuilder.cpp 
b/clang/lib/CodeGen/ConstantInitBuilder.cpp
index ce1fe137c1919..c5b1ad3a07235 100644
--- a/clang/lib/CodeGen/ConstantInitBuilder.cpp
+++ b/clang/lib/CodeGen/ConstantInitBuilder.cpp
@@ -314,3 +314,15 @@ void ConstantAggregateBuilderBase::addSignedPointer(
   Pointer, Schema, StorageAddress, CalleeDecl, CalleeType);
   add(SignedPointer);
 }
+
+void ConstantAggregateBuilderBase::addSignedPointer(
+llvm::Constant *Pointer, unsigned Key, bool UseAddressDiscrimination,
+llvm::ConstantInt *OtherDiscriminator) {
+  llvm::Constant *StorageAddress = nullptr;
+  if (UseAddressDiscrimination)
+StorageAddress = getAddrOfCurrentPosition(Pointer->getType());
+
+  llvm::Constant *SignedPointer = Builder.CGM.getConstantSignedPointer(
+  Pointer, Key, StorageAddress, OtherDiscriminator);
+  add(SignedPointer);
+}
diff --git a/clang/test/CodeGenObjC/ptrauth-attr-exception.m 
b/clang/test/CodeGenObjC/ptrauth-attr-exception.m
new file mode 100644
index 0..1a17828b927da
--- /dev/null
+++ b/clang/test/CodeGenObjC/ptrauth-attr-exception.m
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm 
-fexceptions -fobjc-exceptions -o - %s | FileCheck %s
+
+__attribute__((objc_root_class))
+@i

[clang] Merge similar Clang Thread Safety attributes (PR #135561)

2025-04-13 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-analysis

Author: Aaron Puchert (aaronpuchert)


Changes

Some of the old lock-based and new capability-based spellings behave basically 
in the same way, so merging them simplifies the code significantly.

There are two minor functional changes: we only warn (instead of an error) when 
the try_acquire_capability attribute is used on something else than a function. 
The alternative would have been to produce an error for the old spelling, but 
we seem to only warn for all function attributes, so this is arguably more 
consistent.

The second change is that we also check the first argument (which is the value 
returned for a successful try-acquire) for `this`. But from what I can tell, 
this code is defunct anyway at the moment (see #31414).

---
Full diff: https://github.com/llvm/llvm-project/pull/135561.diff


6 Files Affected:

- (modified) clang/include/clang/Basic/Attr.td (+11-54) 
- (modified) clang/lib/AST/ASTImporter.cpp (-28) 
- (modified) clang/lib/Analysis/ThreadSafety.cpp (+5-55) 
- (modified) clang/lib/Sema/SemaDeclAttr.cpp (-55) 
- (modified) clang/lib/Sema/SemaDeclCXX.cpp (+4-9) 
- (modified) clang/test/Sema/attr-capabilities.c (+1-1) 


``diff
diff --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index fd9e686485552..cff1f12b94999 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -3803,7 +3803,9 @@ def Capability : InheritableAttr {
 
 def AssertCapability : InheritableAttr {
   let Spellings = [Clang<"assert_capability", 0>,
-   Clang<"assert_shared_capability", 0>];
+   Clang<"assert_shared_capability", 0>,
+   GNU<"assert_exclusive_lock">,
+   GNU<"assert_shared_lock">];
   let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
@@ -3811,7 +3813,8 @@ def AssertCapability : InheritableAttr {
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"assert_shared_capability", 0>]>];
+[Clang<"assert_shared_capability", 0>,
+ GNU<"assert_shared_lock">]>];
   let Documentation = [AssertCapabilityDocs];
 }
 
@@ -3834,16 +3837,18 @@ def AcquireCapability : InheritableAttr {
 
 def TryAcquireCapability : InheritableAttr {
   let Spellings = [Clang<"try_acquire_capability", 0>,
-   Clang<"try_acquire_shared_capability", 0>];
-  let Subjects = SubjectList<[Function],
- ErrorDiag>;
+   Clang<"try_acquire_shared_capability", 0>,
+   GNU<"exclusive_trylock_function">,
+   GNU<"shared_trylock_function">];
+  let Subjects = SubjectList<[Function]>;
   let LateParsed = LateAttrParseStandard;
   let TemplateDependent = 1;
   let ParseArgumentsAsUnevaluated = 1;
   let InheritEvenIfAlreadyPresent = 1;
   let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
   let Accessors = [Accessor<"isShared",
-[Clang<"try_acquire_shared_capability", 0>]>];
+[Clang<"try_acquire_shared_capability", 0>,
+ GNU<"shared_trylock_function">]>];
   let Documentation = [TryAcquireCapabilityDocs];
 }
 
@@ -3933,54 +3938,6 @@ def AcquiredBefore : InheritableAttr {
   let Documentation = [Undocumented];
 }
 
-def AssertExclusiveLock : InheritableAttr {
-  let Spellings = [GNU<"assert_exclusive_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-def AssertSharedLock : InheritableAttr {
-  let Spellings = [GNU<"assert_shared_lock">];
-  let Args = [VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-// The first argument is an integer or boolean value specifying the return 
value
-// of a successful lock acquisition.
-def ExclusiveTrylockFunction : InheritableAttr {
-  let Spellings = [GNU<"exclusive_trylock_function">];
-  let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
-  let LateParsed = LateAttrParseStandard;
-  let TemplateDependent = 1;
-  let ParseArgumentsAsUnevaluated = 1;
-  let InheritEvenIfAlreadyPresent = 1;
-  let Subjects = SubjectList<[Function]>;
-  let Documentation = [Undocumented];
-}
-
-// The first argument is an integer or boolean value specifying the return 
value
-// of a successful lock acquisition.
-def SharedTrylockFunction : InheritableAttr {
-  let Spellings = [GNU<"shared_tryloc

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-13 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Harald van Dijk (hvdijk)


Changes

RecordLayout::UnadjustedAlignment was documented as "Maximum of the alignments 
of the record members in characters", but 
RecordLayout::getUnadjustedAlignment(), which just returns UnadjustedAlignment, 
was documented as getting "the record alignment in characters, before alignment 
adjustement." These are not the same thing: the former excludes alignment of 
base classes, the latter takes it into account. 
ItaniumRecordLayoutBuilder::LayoutBase was setting it according to the former, 
but the AAPCS calling convention handling, currently the only user, relies on 
it being set according to the latter.

Fixes #135551.

---
Full diff: https://github.com/llvm/llvm-project/pull/135564.diff


4 Files Affected:

- (modified) clang/include/clang/AST/RecordLayout.h (+4-3) 
- (modified) clang/lib/AST/RecordLayoutBuilder.cpp (+1) 
- (modified) clang/test/CodeGen/aapcs64-align.cpp (+36-21) 
- (modified) clang/test/CodeGen/arm-vfp16-arguments2.cpp (+1-1) 


``diff
diff --git a/clang/include/clang/AST/RecordLayout.h 
b/clang/include/clang/AST/RecordLayout.h
index dd18f9c49f84f..6cf08e76396e2 100644
--- a/clang/include/clang/AST/RecordLayout.h
+++ b/clang/include/clang/AST/RecordLayout.h
@@ -75,8 +75,9 @@ class ASTRecordLayout {
   // performance or backwards compatibility preserving (e.g. AIX-ABI).
   CharUnits PreferredAlignment;
 
-  // UnadjustedAlignment - Maximum of the alignments of the record members in
-  // characters.
+  // UnadjustedAlignment - Alignment of record in characters before alignment
+  // adjustments. Maximum of the alignments of the record members and base
+  // classes in characters.
   CharUnits UnadjustedAlignment;
 
   /// RequiredAlignment - The required alignment of the object.  In the MS-ABI
@@ -186,7 +187,7 @@ class ASTRecordLayout {
   CharUnits getPreferredAlignment() const { return PreferredAlignment; }
 
   /// getUnadjustedAlignment - Get the record alignment in characters, before
-  /// alignment adjustement.
+  /// alignment adjustment.
   CharUnits getUnadjustedAlignment() const { return UnadjustedAlignment; }
 
   /// getSize - Get the record size in characters.
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp 
b/clang/lib/AST/RecordLayoutBuilder.cpp
index 3e756ab9b9bfe..b49bcd0e3ba42 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const 
BaseSubobjectInfo *Base) {
 setSize(std::max(getSize(), Offset + Layout.getSize()));
 
   // Remember max struct/class alignment.
+  UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
   UpdateAlignment(BaseAlign, UnpackedAlignTo, PreferredBaseAlign);
 
   return Offset;
diff --git a/clang/test/CodeGen/aapcs64-align.cpp 
b/clang/test/CodeGen/aapcs64-align.cpp
index e69faf231936c..f9be94b8ec58e 100644
--- a/clang/test/CodeGen/aapcs64-align.cpp
+++ b/clang/test/CodeGen/aapcs64-align.cpp
@@ -67,6 +67,21 @@ void g3() {
 // CHECK: declare void @f3(i64 noundef, i128)
 // CHECK: declare void @f3m(i64 noundef, i64 noundef, i64 noundef, i64 
noundef, i64 noundef, i128)
 
+// Increased natural alignment through a base class.
+struct SB16 : S16 {};
+
+void f4(long, SB16);
+void f4m(long, long, long, long, long, SB16);
+void g4() {
+  SB16 s = {6, 7};
+  f4(1, s);
+  f4m(1, 2, 3, 4, 5, s);
+}
+// CHECK: define{{.*}} void @g4
+// CHECK: call void @f4(i64 noundef 1, i128 129127208515966861318)
+// CHECK: call void @f4m(i64 noundef 1, i64 noundef 2, i64 noundef 3, i64 
noundef 4, i64 noundef 5, i128 129127208515966861318)
+// CHECK: declare void @f4(i64 noundef, i128)
+// CHECK: declare void @f4m(i64 noundef, i64 noundef, i64 noundef, i64 
noundef, i64 noundef, i128)
 
 // Packed structure.
 struct  __attribute__((packed)) P {
@@ -74,18 +89,18 @@ struct  __attribute__((packed)) P {
   long u;
 };
 
-void f4(int, P);
-void f4m(int, int, int, int, int, P);
-void g4() {
+void f5(int, P);
+void f5m(int, int, int, int, int, P);
+void g5() {
   P s = {6, 7};
-  f4(1, s);
-  f4m(1, 2, 3, 4, 5, s);
+  f5(1, s);
+  f5m(1, 2, 3, 4, 5, s);
 }
-// CHECK: define{{.*}} void @g4()
-// CHECK: call void @f4(i32 noundef 1, [2 x i64] [i64 30064771078, i64 0])
-// CHECK: void @f4m(i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 
4, i32 noundef 5, [2 x i64] [i64 30064771078, i64 0])
-// CHECK: declare void @f4(i32 noundef, [2 x i64])
-// CHECK: declare void @f4m(i32 noundef, i32 noundef, i32 noundef, i32 
noundef, i32 noundef, [2 x i64])
+// CHECK: define{{.*}} void @g5()
+// CHECK: call void @f5(i32 noundef 1, [2 x i64] [i64 30064771078, i64 0])
+// CHECK: void @f5m(i32 noundef 1, i32 noundef 2, i32 noundef 3, i32 noundef 
4, i32 noundef 5, [2 x i64] [i64 30064771078, i64 0])
+// CHECK: declare void @f5(i32 noundef, [2 x i64])
+// CHECK: declare void @f5m(i32 noundef, i32 noundef, i32 noundef, i32 
noundef, i32 noundef, [2 x i64])
 
 
 //

[clang-tools-extra] 3de9301 - [clangd] Add a build option to disable building dexp (#133124)

2025-04-13 Thread via cfe-commits

Author: Yoann Congal
Date: 2025-04-13T18:03:46-04:00
New Revision: 3de93015386f17d3430c6534b9fa3e2a9adfaa1a

URL: 
https://github.com/llvm/llvm-project/commit/3de93015386f17d3430c6534b9fa3e2a9adfaa1a
DIFF: 
https://github.com/llvm/llvm-project/commit/3de93015386f17d3430c6534b9fa3e2a9adfaa1a.diff

LOG: [clangd] Add a build option to disable building dexp (#133124)

Building dexp on Debian 11 currently causes intermittent failures [0] [1].

Adding the CLANGD_BUILD_DEXP option to disable dexp from the build
allows Debian 11 users to build clang (albeit without the dexp tool).

This option is set to "Build Dexp" by default so, no change is expected
without manual setting.

[0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15803
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101322

Added: 


Modified: 
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/test/CMakeLists.txt
clang-tools-extra/clangd/test/lit.site.cfg.py.in

Removed: 




diff  --git a/clang-tools-extra/clangd/CMakeLists.txt 
b/clang-tools-extra/clangd/CMakeLists.txt
index 6f10afe4a5625..a1e9da41b4b32 100644
--- a/clang-tools-extra/clangd/CMakeLists.txt
+++ b/clang-tools-extra/clangd/CMakeLists.txt
@@ -210,6 +210,9 @@ if (CLANGD_ENABLE_REMOTE)
   include(AddGRPC)
 endif()
 
+option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON)
+llvm_canonicalize_cmake_booleans(CLANGD_BUILD_DEXP)
+
 if(CLANG_INCLUDE_TESTS)
   add_subdirectory(test)
   add_subdirectory(unittests)
@@ -220,4 +223,7 @@ option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable 
remote index support for
 set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual 
installation.")
 
 add_subdirectory(index/remote)
-add_subdirectory(index/dex/dexp)
+
+if(CLANGD_BUILD_DEXP)
+  add_subdirectory(index/dex/dexp)
+endif()

diff  --git a/clang-tools-extra/clangd/test/CMakeLists.txt 
b/clang-tools-extra/clangd/test/CMakeLists.txt
index b51f461a49866..42fc3506641f2 100644
--- a/clang-tools-extra/clangd/test/CMakeLists.txt
+++ b/clang-tools-extra/clangd/test/CMakeLists.txt
@@ -3,8 +3,6 @@ set(CLANGD_TEST_DEPS
   ClangdTests
   clangd-indexer
   split-file
-  # No tests for it, but we should still make sure they build.
-  dexp
   )
 
 if(CLANGD_BUILD_XPC)
@@ -12,6 +10,11 @@ if(CLANGD_BUILD_XPC)
   list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests)
 endif()
 
+if(CLANGD_BUILD_DEXP)
+  # No tests for it, but we should still make sure they build.
+  list(APPEND CLANGD_TEST_DEPS dexp)
+endif()
+
 if(CLANGD_ENABLE_REMOTE)
   list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor)
 endif()

diff  --git a/clang-tools-extra/clangd/test/lit.site.cfg.py.in 
b/clang-tools-extra/clangd/test/lit.site.cfg.py.in
index 1fe7c8d0f3244..a0bb3561e19ee 100644
--- a/clang-tools-extra/clangd/test/lit.site.cfg.py.in
+++ b/clang-tools-extra/clangd/test/lit.site.cfg.py.in
@@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@"
 config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.."
 config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.."
 config.clangd_build_xpc = @CLANGD_BUILD_XPC@
+config.clangd_build_dexp = @CLANGD_BUILD_DEXP@
 config.clangd_enable_remote = @CLANGD_ENABLE_REMOTE@
 config.clangd_tidy_checks = @CLANGD_TIDY_CHECKS@
 config.have_zlib = @LLVM_ENABLE_ZLIB@



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-13 Thread Chuanqi Xu via cfe-commits

https://github.com/ChuanqiXu9 approved this pull request.

Yeah, I have some concern about the interface. But I am in the camp that we'd 
better to get best practice from practice instead of pure imagination. And 
given Meta is doing the experiments in practice, I think it is fine to let it 
go.

https://github.com/llvm/llvm-project/pull/135147
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (PR #135178)

2025-04-13 Thread via cfe-commits

https://github.com/YLChenZ updated 
https://github.com/llvm/llvm-project/pull/135178

>From 1119ecf764ecd94c12966758964cb486709a441d Mon Sep 17 00:00:00 2001
From: YLChenZ 
Date: Thu, 10 Apr 2025 21:20:58 +0800
Subject: [PATCH 1/2] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue
 support to APValue::dump()

---
 clang/lib/AST/TextNodeDumper.cpp   |  4 
 clang/test/AST/ast-dump-APValue-lvalue.cpp | 12 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index be8d609974d81..0849e5642f006 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -738,6 +738,10 @@ void TextNodeDumper::Visit(const APValue &Value, QualType 
Ty) {
 else if (const auto *BE = B.dyn_cast()) {
   OS << BE->getStmtClassName() << ' ';
   dumpPointer(BE);
+} else if (B.is()) {
+  OS << "TypeInfoLValue";
+} else if (B.is()) {
+  OS << "DynamicAllocLValue";
 } else {
   const auto *VDB = B.get();
   OS << VDB->getDeclKindName() << "Decl";
diff --git a/clang/test/AST/ast-dump-APValue-lvalue.cpp 
b/clang/test/AST/ast-dump-APValue-lvalue.cpp
index 224caddb3eabe..7e520254da41a 100644
--- a/clang/test/AST/ast-dump-APValue-lvalue.cpp
+++ b/clang/test/AST/ast-dump-APValue-lvalue.cpp
@@ -23,6 +23,10 @@ struct F {
 };
 F f;
 
+namespace std {
+  class type_info;
+}
+
 void Test(int (&arr)[10]) {
   constexpr int *pi = &i;
   // CHECK:  | `-VarDecl {{.*}}  col:{{.*}} pi 'int 
*const' constexpr cinit
@@ -45,6 +49,10 @@ void Test(int (&arr)[10]) {
   // CHECK-NEXT:  |   |-value: LValue Base=VarDecl {{.*}}, Null=0, Offset=2, 
HasPath=1, PathLength=2, Path=({{.*}}, 2)
 
   constexpr const int *n = nullptr;
-  // CHECK:`-VarDecl {{.*}}  col:{{.*}} n 'const 
int *const' constexpr cinit
-  // CHECK-NEXT:  |-value: LValue Base=null, Null=1, Offset=0, HasPath=1, 
PathLength=0, Path=()
+  // CHECK:  | `-VarDecl {{.*}}  col:{{.*}} n 'const 
int *const' constexpr cinit
+  // CHECK-NEXT:  |   |-value: LValue Base=null, Null=1, Offset=0, HasPath=1, 
PathLength=0, Path=()
+
+  constexpr const std::type_info* pti = &typeid(int);
+  // CHECK:`-VarDecl {{.*}}  col:{{.*}} pti 'const 
std::type_info *const' constexpr cinit
+  // CHECK-NEXT:  |-value: LValue Base=TypeInfoLValue, Null=0, Offset=0, 
HasPath=1, PathLength=0, Path=()
 }

>From 23d850d5833dd28293cb9bf4aff5e5b9dac7cc1d Mon Sep 17 00:00:00 2001
From: YLChenZ 
Date: Mon, 14 Apr 2025 10:47:50 +0800
Subject: [PATCH 2/2] print more information

---
 clang/lib/AST/TextNodeDumper.cpp   | 7 ++-
 clang/test/AST/ast-dump-APValue-lvalue.cpp | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp
index 0849e5642f006..4c1091c29cb6b 100644
--- a/clang/lib/AST/TextNodeDumper.cpp
+++ b/clang/lib/AST/TextNodeDumper.cpp
@@ -739,9 +739,14 @@ void TextNodeDumper::Visit(const APValue &Value, QualType 
Ty) {
   OS << BE->getStmtClassName() << ' ';
   dumpPointer(BE);
 } else if (B.is()) {
-  OS << "TypeInfoLValue";
+  OS << "TypeInfoLValue ";
+  const auto BTI = B.get();
+  ColorScope Color(OS, ShowColors, TypeColor);
+  BTI.print(OS,PrintPolicy);
 } else if (B.is()) {
   OS << "DynamicAllocLValue";
+  auto BDA = B.getDynamicAllocType();
+  dumpType(BDA);
 } else {
   const auto *VDB = B.get();
   OS << VDB->getDeclKindName() << "Decl";
diff --git a/clang/test/AST/ast-dump-APValue-lvalue.cpp 
b/clang/test/AST/ast-dump-APValue-lvalue.cpp
index 7e520254da41a..333f7aa419377 100644
--- a/clang/test/AST/ast-dump-APValue-lvalue.cpp
+++ b/clang/test/AST/ast-dump-APValue-lvalue.cpp
@@ -54,5 +54,5 @@ void Test(int (&arr)[10]) {
 
   constexpr const std::type_info* pti = &typeid(int);
   // CHECK:`-VarDecl {{.*}}  col:{{.*}} pti 'const 
std::type_info *const' constexpr cinit
-  // CHECK-NEXT:  |-value: LValue Base=TypeInfoLValue, Null=0, Offset=0, 
HasPath=1, PathLength=0, Path=()
+  // CHECK-NEXT:  |-value: LValue Base=TypeInfoLValue typeid(int), Null=0, 
Offset=0, HasPath=1, PathLength=0, Path=()
 }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Sema] Use llvm::erase_if (NFC) (PR #135574)

2025-04-13 Thread Jakub Kuderski via cfe-commits

https://github.com/kuhar approved this pull request.


https://github.com/llvm/llvm-project/pull/135574
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


  1   2   3   >