Files
TheRock/compiler/amd-llvm/compiler-rt/test/profile/Linux/Inputs/instrprof-value-merge.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

73 lines
2.1 KiB
C

#include <string.h>
void (*f0)();
void (*f1)();
void (*f2)();
char dst[200];
char src[200];
volatile int n;
__attribute__((noinline)) void foo() {}
__attribute__((noinline)) void bar() {
f0 = foo;
f1 = foo;
f2 = foo;
n = 4;
}
int main(int argc, char *argv[]) {
int i;
bar();
if (argc == 1) {
f0();
for (i = 0; i < 9; i++)
f1();
for (i = 0; i < 99; i++)
f2();
} else {
memcpy((void *)dst, (void *)src, n);
for (i = 0; i < 6; i++)
memcpy((void *)(dst + 2), (void *)src, n + 1);
for (i = 0; i < 66; i++)
memcpy((void *)(dst + 9), (void *)src, n + 2);
}
}
// CHECK: Counters:
// CHECK-NEXT: main:
// CHECK-NEXT: Hash: 0x0a9bd81e87ab6e87
// CHECK-NEXT: Counters: 6
// CHECK-NEXT: Indirect Call Site Count: 3
// CHECK-NEXT: Number of Memory Intrinsics Calls: 3
// CHECK-NEXT: Block counts: [27, 297, 12, 132, 3, 2]
// CHECK-NEXT: Indirect Target Results:
// CHECK-NEXT: [ 0, foo, 3 ]
// CHECK-NEXT: [ 1, foo, 27 ]
// CHECK-NEXT: [ 2, foo, 297 ]
// CHECK-NEXT: Memory Intrinsic Size Results:
// CHECK-NEXT: [ 0, 4, 2 ]
// CHECK-NEXT: [ 1, 5, 12 ]
// CHECK-NEXT: [ 2, 6, 132 ]
// CHECK-NEXT: Instrumentation level: IR entry_first = 0
// CHECK-NEXT: Functions shown: 1
// CHECK-NEXT: Total functions: 3
// CHECK-NEXT: Maximum function count: 327
// CHECK-NEXT: Maximum internal block count: 297
// CHECK-NEXT: Total number of blocks: 8
// CHECK-NEXT: Total count: 805
// CHECK-NEXT: Statistics for indirect call sites profile:
// CHECK-NEXT: Total number of sites: 3
// CHECK-NEXT: Total number of sites with values: 3
// CHECK-NEXT: Total number of profiled values: 3
// CHECK-NEXT: Value sites histogram:
// CHECK-NEXT: NumTargets, SiteCount
// CHECK-NEXT: 1, 3
// CHECK-NEXT: Statistics for memory intrinsic calls sizes profile:
// CHECK-NEXT: Total number of sites: 3
// CHECK-NEXT: Total number of sites with values: 3
// CHECK-NEXT: Total number of profiled values: 3
// CHECK-NEXT: Value sites histogram:
// CHECK-NEXT: NumTargets, SiteCount
// CHECK-NEXT: 1, 3