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
70 lines
2.0 KiB
C
70 lines
2.0 KiB
C
// Blocks that we have no profile data for (ie, it was never reached in training
|
|
// runs) shouldn't have any branch weight metadata added.
|
|
|
|
// RUN: llvm-profdata merge %S/Inputs/c-unprofiled-blocks.proftext -o %t.profdata
|
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instrument-use=clang -fprofile-instrument-use-path=%t.profdata | FileCheck -check-prefix=PGOUSE %s
|
|
|
|
// PGOUSE-LABEL: @never_called(i32 noundef %i)
|
|
int never_called(int i) {
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
if (i) {}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
for (i = 0; i < 100; ++i) {
|
|
}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
while (--i) {}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}, !llvm.loop [[LOOP1:!.*]]
|
|
do {} while (i++ < 75);
|
|
|
|
// PGOUSE: switch {{.*}} [
|
|
// PGOUSE-NEXT: i32 12
|
|
// PGOUSE-NEXT: i32 82
|
|
// PGOUSE-NEXT: ]{{$}}
|
|
switch (i) {
|
|
case 12: return 3;
|
|
case 82: return 0;
|
|
default: return 89;
|
|
}
|
|
}
|
|
|
|
// PGOUSE-LABEL: @dead_code(i32 noundef %i)
|
|
int dead_code(int i) {
|
|
// PGOUSE: br {{.*}}, !prof !{{[0-9]+}}
|
|
if (i) {
|
|
// This branch is never reached.
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
if (!i) {}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
for (i = 0; i < 100; ++i) {
|
|
}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
|
|
while (--i) {}
|
|
|
|
// PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}, !llvm.loop [[LOOP2:!.*]]
|
|
do {} while (i++ < 75);
|
|
|
|
// PGOUSE: switch {{.*}} [
|
|
// PGOUSE-NEXT: i32 12
|
|
// PGOUSE-NEXT: i32 82
|
|
// PGOUSE-NEXT: ]{{$}}
|
|
switch (i) {
|
|
case 12: return 3;
|
|
case 82: return 0;
|
|
default: return 89;
|
|
}
|
|
}
|
|
return 2;
|
|
}
|
|
|
|
// PGOUSE-LABEL: @main(i32 noundef %argc, ptr noundef %argv)
|
|
int main(int argc, const char *argv[]) {
|
|
dead_code(0);
|
|
return 0;
|
|
}
|