This repository has been archived by the owner on Jul 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to skip writing an output file
Summary: The user may wish to run BOLT for printing statistics only (i.e. to check that the profile is valid). Add an option to run BOLT without writing any output file, similar to a dry run. This option is triggered by supplying -o with "/dev/null". Reviewed By: maksfb Differential Revision: D26347237 fbshipit-source-id: 14214eab075
- Loading branch information
1 parent
125a226
commit de8a890
Showing
2 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This script checks that BOLT is able to work in dry run mode (no output) | ||
|
||
# REQUIRES: system-linux | ||
|
||
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ | ||
# RUN: %s -o %t.o | ||
# RUN: link_fdata %s %t.o %t.fdata | ||
# RUN: strip --strip-unneeded %t.o | ||
# RUN: %host_cc %t.o -o %t.exe -Wl,-q | ||
# RUN: llvm-bolt %t.exe -relocs=1 -print-profile-stats -o /dev/null \ | ||
# RUN: -data %t.fdata | FileCheck %s | ||
|
||
.text | ||
.globl main | ||
.type main, %function | ||
.p2align 4 | ||
main: | ||
# FDATA: 0 [unknown] 0 1 main 0 0 510 | ||
pushq %rbp | ||
movq %rsp, %rbp | ||
subq $0x18, %rsp | ||
addq $0x18, %rsp | ||
xorq %rax, %rax | ||
leaveq | ||
retq | ||
.size main, .-main | ||
|
||
|
||
# CHECK: Skipping writing final binary |