Skip to content

[MemProf] Drop unneccessary REQUIRES: x86-linux directives. #142718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

snehasish
Copy link
Contributor

These tests now use the YAML profile and should work across all
platforms.

These tests now use the YAML profile and should work across all
platforms.
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@snehasish snehasish marked this pull request as ready for review June 4, 2025 05:27
@llvmbot llvmbot added PGO Profile Guided Optimizations llvm:transforms labels Jun 4, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 4, 2025

@llvm/pr-subscribers-pgo

@llvm/pr-subscribers-llvm-transforms

Author: Snehasish Kumar (snehasish)

Changes

These tests now use the YAML profile and should work across all
platforms.


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

9 Files Affected:

  • (modified) llvm/test/Transforms/PGOProfile/memprof-call-site-at-alloc-site.ll (-1)
  • (modified) llvm/test/Transforms/PGOProfile/memprof-dump-matched-alloc-site.ll (-1)
  • (modified) llvm/test/Transforms/PGOProfile/memprof-dump-matched-call-sites.ll (-1)
  • (modified) llvm/test/Transforms/PGOProfile/memprof-undrift.test (-1)
  • (modified) llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test (-1)
  • (modified) llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll (-2)
  • (modified) llvm/test/Transforms/PGOProfile/memprof_match_hot_cold_new_calls.ll (-2)
  • (modified) llvm/test/Transforms/PGOProfile/memprof_missing_leaf.ll (-2)
  • (modified) llvm/test/tools/llvm-profdata/memprof-yaml-invalid.test (-1)
diff --git a/llvm/test/Transforms/PGOProfile/memprof-call-site-at-alloc-site.ll b/llvm/test/Transforms/PGOProfile/memprof-call-site-at-alloc-site.ll
index b5a4648dad74d..a0a359cea6a36 100644
--- a/llvm/test/Transforms/PGOProfile/memprof-call-site-at-alloc-site.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof-call-site-at-alloc-site.ll
@@ -2,7 +2,6 @@
 ; allocation call stack but does not call one of the memory allocation
 ; functions.
 
-; REQUIRES: x86_64-linux
 ; RUN: split-file %s %t
 ; RUN: llvm-profdata merge %t/memprof-call-site-at-alloc-site.yaml -o %t/memprof-call-site-at-alloc-site.memprofdata
 ; RUN: opt < %t/memprof-call-site-at-alloc-site.ll -passes='memprof-use<profile-filename=%t/memprof-call-site-at-alloc-site.memprofdata>' -memprof-print-match-info -S 2>&1 | FileCheck %s
diff --git a/llvm/test/Transforms/PGOProfile/memprof-dump-matched-alloc-site.ll b/llvm/test/Transforms/PGOProfile/memprof-dump-matched-alloc-site.ll
index b9126ac9a457f..60ff6d0928967 100644
--- a/llvm/test/Transforms/PGOProfile/memprof-dump-matched-alloc-site.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof-dump-matched-alloc-site.ll
@@ -23,7 +23,6 @@
 ;
 ; Here we expect to match the allocation site to encompass 3 frames.
 
-; REQUIRES: x86_64-linux
 ; RUN: split-file %s %t
 ; RUN: llvm-profdata merge %t/memprof-dump-matched-alloc-site.yaml -o %t/memprof-dump-matched-alloc-site.memprofdata
 ; RUN: opt < %t/memprof-dump-matched-alloc-site.ll -passes='memprof-use<profile-filename=%t/memprof-dump-matched-alloc-site.memprofdata>' -memprof-print-match-info -S 2>&1 | FileCheck %s
diff --git a/llvm/test/Transforms/PGOProfile/memprof-dump-matched-call-sites.ll b/llvm/test/Transforms/PGOProfile/memprof-dump-matched-call-sites.ll
index fa99116b820f9..ed3a079a93f73 100644
--- a/llvm/test/Transforms/PGOProfile/memprof-dump-matched-call-sites.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof-dump-matched-call-sites.ll
@@ -31,7 +31,6 @@
 ; Note that f3 is considered to be an allocation site, not a call site, because
 ; it directly calls new after inlining.
 
-; REQUIRES: x86_64-linux
 ; RUN: split-file %s %t
 ; RUN: llvm-profdata merge %t/memprof-dump-matched-call-site.yaml -o %t/memprof-dump-matched-call-site.memprofdata
 ; RUN: opt < %t/memprof-dump-matched-call-site.ll -passes='memprof-use<profile-filename=%t/memprof-dump-matched-call-site.memprofdata>' -memprof-print-match-info -S 2>&1 | FileCheck %s
diff --git a/llvm/test/Transforms/PGOProfile/memprof-undrift.test b/llvm/test/Transforms/PGOProfile/memprof-undrift.test
index 5529c7701f6ec..b2006fa3f8bf8 100644
--- a/llvm/test/Transforms/PGOProfile/memprof-undrift.test
+++ b/llvm/test/Transforms/PGOProfile/memprof-undrift.test
@@ -1,4 +1,3 @@
-; REQUIRES: x86_64-linux
 
 ; Make sure that we can undrift the MemProf profile and annotate the IR
 ; accordingly.
diff --git a/llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test b/llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test
index 1ef963dec9e23..28ded32082b19 100644
--- a/llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test
+++ b/llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test
@@ -1,4 +1,3 @@
-; REQUIRES: x86_64-linux
 
 ; Make sure that we can ingest the MemProf profile in YAML and
 ; annotate a call to new as cold.
diff --git a/llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll b/llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll
index a1f8369243888..92a2a0ecd789d 100644
--- a/llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll
@@ -1,7 +1,5 @@
 ;; Tests option to discard small noncold contexts.
 
-;; Avoid failures on big-endian systems that can't read the profile properly
-; REQUIRES: x86_64-linux
 
 ;; Generate the profile and the IR.
 ; RUN: split-file %s %t
diff --git a/llvm/test/Transforms/PGOProfile/memprof_match_hot_cold_new_calls.ll b/llvm/test/Transforms/PGOProfile/memprof_match_hot_cold_new_calls.ll
index 4aa0511622662..596323c662deb 100644
--- a/llvm/test/Transforms/PGOProfile/memprof_match_hot_cold_new_calls.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof_match_hot_cold_new_calls.ll
@@ -1,8 +1,6 @@
 ;; Tests optional matching of memprof profile on call to operator new
 ;; with manual hot/cold hint.
 
-;; Avoid failures on big-endian systems that can't read the profile properly
-; REQUIRES: x86_64-linux
 
 ;; Generate the profile and the IR.
 ; RUN: split-file %s %t
diff --git a/llvm/test/Transforms/PGOProfile/memprof_missing_leaf.ll b/llvm/test/Transforms/PGOProfile/memprof_missing_leaf.ll
index e6fb1863acbce..3c1c58d62647e 100644
--- a/llvm/test/Transforms/PGOProfile/memprof_missing_leaf.ll
+++ b/llvm/test/Transforms/PGOProfile/memprof_missing_leaf.ll
@@ -3,8 +3,6 @@
 ;; matching and we are able to match the next call frame up the inlined
 ;; context.
 
-;; Avoid failures on big-endian systems that can't read the profile properly
-; REQUIRES: x86_64-linux
 
 ;; # To generate below LLVM IR for use in matching.
 ;; $ clang++ -gmlt -fdebug-info-for-profiling -S memprof_missing_leaf.cc \
diff --git a/llvm/test/tools/llvm-profdata/memprof-yaml-invalid.test b/llvm/test/tools/llvm-profdata/memprof-yaml-invalid.test
index a13451cee5116..0810bcdaa40cc 100644
--- a/llvm/test/tools/llvm-profdata/memprof-yaml-invalid.test
+++ b/llvm/test/tools/llvm-profdata/memprof-yaml-invalid.test
@@ -1,4 +1,3 @@
-; REQUIRES: x86_64-linux
 ; RUN: split-file %s %t
 ; RUN: not llvm-profdata merge %t/memprof-invalid.yaml -o %t/memprof-invalid.indexed
 

@snehasish snehasish requested a review from teresajohnson June 4, 2025 05:27
Copy link
Contributor Author

snehasish commented Jun 4, 2025

Merge activity

  • Jun 4, 3:33 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 4, 3:37 PM UTC: @snehasish merged this pull request with Graphite.

@snehasish snehasish merged commit a87c4ee into main Jun 4, 2025
16 checks passed
@snehasish snehasish deleted the users/snehasish/06-03-_memprof_drop_unneccessary_requires_x86-linux_directives branch June 4, 2025 15:37
snehasish added a commit that referenced this pull request Jun 4, 2025
@snehasish
Copy link
Contributor Author

Reverted in #142816 since it breaks ppc aix builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:transforms PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants