Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: rm -rf %t.dir
// RUN: %clangxx_pgogen=%t.dir -fprofile-continuous -lpthread %s -o %t.exe -mllvm -disable-vp -fprofile-update=atomic
// RUN: %run %t.exe
// RUN: llvm-profdata show --counts --function=accum %t.dir/default_*.profraw | FileCheck %s
// RUN: llvm-profdata show --counts --function accum %t.dir/default_*.profraw | FileCheck %s
// CHECK: Block counts: [100000, 4]

#include <thread>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Value profiling is currently not supported in lightweight mode.
// RUN: %clang_pgogen -o %t -g -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.proflite
// RUN: llvm-profdata merge -o %t.profdata --debug-info %t.dSYM %t.proflite

// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
Expand All @@ -13,7 +13,7 @@

// RUN: %clang_pgogen -o %t.cov -g -mllvm --profile-correlate=debug-info -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov.dSYM %t.cov.proflite
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info %t.cov.dSYM %t.cov.proflite

// RUN: %clang_pgogen -o %t.cov.normal -mllvm --pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal
Expand All @@ -32,7 +32,7 @@
// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.profdir/
// RUN: llvm-profdata merge -o %t.profdata --debug-info %t.dSYM %t.profdir/

// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.functions
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.functions
Expand All @@ -41,7 +41,7 @@
// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov.dSYM %t.profdir/
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info %t.cov.dSYM %t.profdir/

// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal.functions
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov.functions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: split-file %s %t
; RUN: %clang %t/a.ll -o %t/a.out
; RUN: llvm-profdata merge --debug-info=%t/a.out %t/a.proftext --max-debug-info-correlation-warnings=2 -o %t/a.profdata 2>&1 | FileCheck %s --implicit-check-not=warning --check-prefixes=CHECK,LIMIT
; RUN: llvm-profdata merge --debug-info=%t/a.out %t/a.proftext --max-debug-info-correlation-warnings=0 -o %t/a.profdata 2>&1 | FileCheck %s --implicit-check-not=warning --check-prefixes=CHECK,NOLIMIT
; RUN: llvm-profdata merge --debug-info %t/a.out %t/a.proftext --max-debug-info-correlation-warnings 2 -o %t/a.profdata 2>&1 | FileCheck %s --implicit-check-not=warning --check-prefixes=CHECK,LIMIT
; RUN: llvm-profdata merge --debug-info %t/a.out %t/a.proftext --max-debug-info-correlation-warnings 0 -o %t/a.profdata 2>&1 | FileCheck %s --implicit-check-not=warning --check-prefixes=CHECK,NOLIMIT

; CHECK: warning: Incomplete DIE for function None:
; CHECK: warning: Incomplete DIE for function no_cfg: CFGHash=None
Expand Down
10 changes: 5 additions & 5 deletions compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

// RUN: %clang_pgogen -o %t.d4 -g -gdwarf-4 -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.d4.proflite %run %t.d4
// RUN: llvm-profdata merge -o %t.d4.profdata --debug-info=%t.d4 %t.d4.proflite
// RUN: llvm-profdata merge -o %t.d4.profdata --debug-info %t.d4 %t.d4.proflite

// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.dump
// RUN: llvm-profdata show --all-functions --counts %t.d4.profdata > %t.d4.dump
// RUN: diff %t.normal.dump %t.d4.dump

// RUN: %clang_pgogen -o %t -g -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.proflite
// RUN: llvm-profdata merge -o %t.profdata --debug-info %t %t.proflite

// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal2.dump
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof.dump
// RUN: diff %t.normal2.dump %t.prof.dump

// RUN: %clang_pgogen -o %t.cov -g -mllvm --profile-correlate=debug-info -mllvm -pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.cov.proflite %run %t.cov
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.cov.proflite
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info %t.cov %t.cov.proflite

// RUN: %clang_pgogen -o %t.cov.normal -mllvm --pgo-function-entry-coverage -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t.cov.profraw %run %t.cov.normal
Expand All @@ -40,7 +40,7 @@
// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.profdir/
// RUN: llvm-profdata merge -o %t.profdata --debug-info %t %t.profdir/

// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal3.dump
// RUN: llvm-profdata show --all-functions --counts %t.profdata > %t.prof3.dump
Expand All @@ -49,7 +49,7 @@
// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.cov.proflite %run %t.cov
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info=%t.cov %t.profdir/
// RUN: llvm-profdata merge -o %t.cov.profdata --debug-info %t.cov %t.profdir/

// RUN: llvm-profdata show --all-functions --counts %t.cov.normal.profdata > %t.cov.normal2.dump
// RUN: llvm-profdata show --all-functions --counts %t.cov.profdata > %t.cov2.dump
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/profile/Linux/instrprof-instr-suppl.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
// The instrPGO profile counter of function foo should be scaled up. Note the
// scaling factor of a function is computed based on instrPGO profiles and
// invariant to samplePGO profile counters.
// RUN: llvm-profdata merge -supplement-instr-with-sample=sampleprof.proftext \
// RUN: -suppl-min-size-threshold=0 -instr-prof-cold-threshold=1 \
// RUN: llvm-profdata merge -supplement-instr-with-sample sampleprof.proftext \
// RUN: -suppl-min-size-threshold 0 -instr-prof-cold-threshold 1 \
// RUN: main.profdata -o merge.profdata
// RUN: llvm-profdata show -all-functions -counts merge.profdata | FileCheck %s --check-prefix=SUPPL

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %clang_pgogen -o %t -g -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %s
// RUN: llvm-profdata show --debug-info=%t --detailed-summary --show-prof-sym-list | FileCheck %s
// RUN: llvm-profdata show --debug-info=%t --show-format=yaml | FileCheck %s --match-full-lines --check-prefix YAML
// RUN: llvm-profdata show --debug-info %t --detailed-summary --show-prof-sym-list | FileCheck %s
// RUN: llvm-profdata show --debug-info %t --show-format yaml | FileCheck %s --match-full-lines --check-prefix YAML

// RUN: %clang_pgogen -o %t.no.dbg -mllvm --profile-correlate=debug-info -mllvm --disable-vp=true %s
// RUN: not llvm-profdata show --debug-info=%t.no.dbg 2>&1 | FileCheck %s --check-prefix NO-DBG
// RUN: not llvm-profdata show --debug-info %t.no.dbg 2>&1 | FileCheck %s --check-prefix NO-DBG
// NO-DBG: unable to correlate profile: could not find any profile data metadata in correlated file

// YAML: Probes:
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/profile/Linux/instrprof-value-merge-lld.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
// RUN: llvm-profdata show -counts -function main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
6 changes: 3 additions & 3 deletions compiler-rt/test/profile/Linux/instrprof-value-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
// RUN: llvm-profdata show -counts -function main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c

/// -z start-stop-gc requires binutils 2.37. Don't test the option for now.
/// TODO: Add -Wl,--gc-sections.
Expand All @@ -18,7 +18,7 @@
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
// RUN: llvm-profdata show -counts -function main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c

// RUN: %clang_pgogen -o %t -O3 %S/Inputs/instrprof-value-merge.c -no-pie -fuse-ld=gold -ffunction-sections -fdata-sections
// RUN: rm -rf %t.profdir
Expand All @@ -27,4 +27,4 @@
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
// RUN: llvm-profdata show -counts -function main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
12 changes: 6 additions & 6 deletions compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
// RUN: env LLVM_PROFILE_FILE=test.profraw ./test

// Show vtable profiles from raw profile.
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables test.profraw | FileCheck %s --check-prefixes=COMMON,RAW
// RUN: llvm-profdata show --function main --ic-targets --show-vtables test.profraw | FileCheck %s --check-prefixes=COMMON,RAW

// Generate indexed profile from raw profile and show the data.
// RUN: llvm-profdata merge --keep-vtable-symbols test.profraw -o test.profdata
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables test.profdata | FileCheck %s --check-prefixes=COMMON,INDEXED
// RUN: llvm-profdata show --function main --ic-targets --show-vtables test.profdata | FileCheck %s --check-prefixes=COMMON,INDEXED

// Generate text profile from raw and indexed profiles respectively and show the data.
// RUN: llvm-profdata merge --keep-vtable-symbols --text test.profraw -o raw.proftext
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables --text raw.proftext | FileCheck %s --check-prefix=ICTEXT
// RUN: llvm-profdata show --function main --ic-targets --show-vtables --text raw.proftext | FileCheck %s --check-prefix=ICTEXT
// RUN: llvm-profdata merge --keep-vtable-symbols --text test.profdata -o indexed.proftext
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables --text indexed.proftext | FileCheck %s --check-prefix=ICTEXT
// RUN: llvm-profdata show --function main --ic-targets --show-vtables --text indexed.proftext | FileCheck %s --check-prefix=ICTEXT

// Generate indexed profile from text profiles and show the data
// RUN: llvm-profdata merge --keep-vtable-symbols --binary raw.proftext -o text.profraw
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables text.profraw | FileCheck %s --check-prefixes=COMMON,INDEXED
// RUN: llvm-profdata show --function main --ic-targets --show-vtables text.profraw | FileCheck %s --check-prefixes=COMMON,INDEXED
// RUN: llvm-profdata merge --keep-vtable-symbols --binary indexed.proftext -o text.profdata
// RUN: llvm-profdata show --function=main --ic-targets --show-vtables text.profdata | FileCheck %s --check-prefixes=COMMON,INDEXED
// RUN: llvm-profdata show --function main --ic-targets --show-vtables text.profdata | FileCheck %s --check-prefixes=COMMON,INDEXED

// COMMON: Counters:
// COMMON-NEXT: main:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RUN: %clang_profgen %S/Inputs/instrprof-multiprocess.c -o %t
RUN: rm -f %t_*.profraw
RUN: env LLVM_PROFILE_FILE=%t_%m.profraw %run %t
RUN: llvm-profdata show --counts -function=foo %t_*.profraw | FileCheck %s
RUN: llvm-profdata show --counts -function foo %t_*.profraw | FileCheck %s

CHECK: Counters:
CHECK: foo:
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/profile/infinite_loop.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang_pgogen -O2 -o %t %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s
// RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s

void exit(int);
int g;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
// MISSING-CORRELATION-KIND: error: Expected --correlate when --debug-file-directory is provided

// Test error for llvm-profdata merge profile correlation with mixing correlation options.
// RUN: not llvm-profdata merge -o %t.error.profdata --binary-file=%t.correlate.exe --debug-file-directory %t --correlate=binary %t.correlate.profraw 2>&1 | FileCheck %s --check-prefix=MIXING-FLAGS
// RUN: not llvm-profdata merge -o %t.error.profdata --binary-file %t.correlate.exe --debug-file-directory %t --correlate=binary %t.correlate.profraw 2>&1 | FileCheck %s --check-prefix=MIXING-FLAGS
// MIXING-FLAGS: error: Expected only one of -binary-file, -debuginfod or -debug-file-directory
6 changes: 3 additions & 3 deletions compiler-rt/test/profile/instrprof-binary-correlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// With -profile-correlate=binary flag
// RUN: %clang -o %t-1.exe -fprofile-instr-generate -fcoverage-mapping -mllvm -profile-correlate=binary %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp
// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t-1.exe
// RUN: llvm-profdata merge -o %t-1.profdata --binary-file=%t-1.exe %t-1.profraw
// RUN: llvm-profdata merge -o %t-1.profdata --binary-file %t-1.exe %t-1.profraw
// RUN: llvm-cov report --instr-profile=%t-1.profdata %t-1.exe > %t-1.report
// RUN: llvm-cov show --instr-profile=%t-1.profdata %t-1.exe > %t-1.show
// RUN: llvm-profdata show --all-functions --counts %t.normal.profdata > %t.normal.profdata.show
Expand All @@ -21,7 +21,7 @@
// Strip above binary and run
// RUN: llvm-strip %t-1.exe -o %t-2.exe
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t-2.exe
// RUN: llvm-profdata merge -o %t-2.profdata --binary-file=%t-1.exe %t-2.profraw
// RUN: llvm-profdata merge -o %t-2.profdata --binary-file %t-1.exe %t-2.profraw
// RUN: llvm-cov report --instr-profile=%t-2.profdata %t-1.exe > %t-2.report
// RUN: llvm-cov show --instr-profile=%t-2.profdata %t-1.exe > %t-2.show
// RUN: llvm-profdata show --all-functions --counts %t-2.profdata > %t-2.profdata.show
Expand All @@ -39,7 +39,7 @@
// RUN: rm -rf %t.profdir && mkdir %t.profdir
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m-4.profraw %run %t-2.exe
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m-4.profraw %run %t-2.exe
// RUN: llvm-profdata merge -o %t-4.profdata --binary-file=%t-1.exe %t.profdir
// RUN: llvm-profdata merge -o %t-4.profdata --binary-file %t-1.exe %t.profdir
// RUN: llvm-cov report --instr-profile=%t-4.profdata %t-1.exe > %t-4.report
// RUN: llvm-cov show --instr-profile=%t-4.profdata %t-1.exe > %t-4.show
// RUN: llvm-profdata show --all-functions --counts %t.normal.merged.profdata > %t.normal.merged.profdata.show
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/profile/instrprof-timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// RUN: %clang_pgogen -o %t -mllvm -pgo-temporal-instrumentation %s
// RUN: env LLVM_PROFILE_FILE=%t.0.profraw %run %t n
// RUN: env LLVM_PROFILE_FILE=%t.1.profraw %run %t y
// RUN: llvm-profdata merge -o %t.profdata %t.0.profraw --weighted-input=5,%t.1.profraw
// RUN: llvm-profdata merge -o %t.profdata %t.0.profraw --weighted-input 5,%t.1.profraw
// RUN: llvm-profdata show --temporal-profile-traces %t.profdata | FileCheck %s --implicit-check-not=unused

// RUN: rm -f %t.profdata
// RUN: %clang_pgogen -o %t -mllvm -pgo-temporal-instrumentation -mllvm -pgo-block-coverage %s
// RUN: env LLVM_PROFILE_FILE=%t.0.profraw %run %t n
// RUN: env LLVM_PROFILE_FILE=%t.1.profraw %run %t y
// RUN: llvm-profdata merge -o %t.profdata %t.0.profraw --weighted-input=5,%t.1.profraw
// RUN: llvm-profdata merge -o %t.profdata %t.0.profraw --weighted-input 5,%t.1.profraw
// RUN: llvm-profdata show --temporal-profile-traces %t.profdata | FileCheck %s --implicit-check-not=unused

extern void exit(int);
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Transforms/PGOProfile/data-access-profile.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
; RUN: rm -rf %t && split-file %s %t && cd %t

;; Read text profiles and merge them into indexed profiles.
; RUN: llvm-profdata merge --memprof-version=4 memprof.yaml -o memprof.profdata
; RUN: llvm-profdata merge --memprof-version=4 memprof-no-dap.yaml -o memprof-no-dap.profdata
; RUN: llvm-profdata merge --memprof-version 4 memprof.yaml -o memprof.profdata
; RUN: llvm-profdata merge --memprof-version 4 memprof-no-dap.yaml -o memprof-no-dap.profdata

;; Run optimizer pass on an IR module without IR functions, and test that global
;; variables in the module could be annotated (i.e., no early return),
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/PGOProfile/memprof.ll
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
; RUN: opt < %s -passes='memprof-use<profile-filename=%t.memprofdatarand>' -pgo-warn-missing-function -S -stats 2>&1 | FileCheck %s --check-prefixes=ALL,MEMPROFONLY,MEMPROFSTATS

;; Make sure we use a specific random hotness seed if requested.
; RUN: llvm-profdata merge -memprof-random-hotness -memprof-random-hotness-seed=1730170724 %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.memprofdatarand2 2>&1 | FileCheck %s --check-prefix=RAND2
; RUN: llvm-profdata merge -memprof-random-hotness -memprof-random-hotness-seed 1730170724 %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.memprofdatarand2 2>&1 | FileCheck %s --check-prefix=RAND2
; RAND2: random hotness seed = 1730170724
; RUN: opt < %s -passes='memprof-use<profile-filename=%t.memprofdatarand2>' -pgo-warn-missing-function -S -stats 2>&1 | FileCheck %s --check-prefixes=MEMPROFRAND2,ALL,MEMPROFONLY,MEMPROFSTATS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
; RUN: split-file %s %t

;; Basic functionality with flag toggle
; RUN: llvm-profdata merge --memprof-version=4 %t/basic.yaml -o %t/basic.memprofdata
; RUN: llvm-profdata merge --memprof-version 4 %t/basic.yaml -o %t/basic.memprofdata
; RUN: opt < %t/basic.ll -passes='memprof-use<profile-filename=%t/basic.memprofdata>' -memprof-attach-calleeguids=false -S 2>&1 | FileCheck %s --check-prefix=CHECK-DISABLE
; RUN: opt < %t/basic.ll -passes='memprof-use<profile-filename=%t/basic.memprofdata>' -memprof-attach-calleeguids=true -S 2>&1 | FileCheck %s --check-prefix=CHECK-ENABLE --dump-input-filter=all

;; FDO conflict handling
; RUN: llvm-profdata merge --memprof-version=4 %t/fdo_conflict.yaml -o %t/fdo_conflict.memprofdata
; RUN: llvm-profdata merge --memprof-version 4 %t/fdo_conflict.yaml -o %t/fdo_conflict.memprofdata
; RUN: opt < %t/fdo_conflict.ll -passes='memprof-use<profile-filename=%t/fdo_conflict.memprofdata>' -memprof-attach-calleeguids=true -S 2>&1 | FileCheck %s --check-prefix=CHECK-FDO

;--- basic.yaml
Expand Down
Loading
Loading