forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve --report_progress_every flag (llvm#64)
Currently, the --report_progress_every flag, even with the default value, will always report progress on the first block. This is not the intended behavior, as no output should be given with the default value. This patch fixes that behavior and also adds a test to ensure that the flag functions as intended in the default value case and in the value-provided case. Not really super critical to functionality, but a little bit annoying to have this.
- Loading branch information
1 parent
78f6845
commit c1231ad
Showing
2 changed files
with
23 additions
and
1 deletion.
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,22 @@ | ||
; Test that the --report_progress_every reports progress at the expected | ||
; intervals. | ||
|
||
; RUN: split-file %s %t | ||
; RUN: mkdir %t.asmdir | ||
; RUN: %convert_bhive_to_llvm_exegesis_input --asm_output_dir=%t.asmdir --bhive_csv=%t/test.csv --report_progress_every=2 2>&1 | FileCheck %s | ||
|
||
; CHECK: Finished annotating block #2. | ||
; CHECK: Finished annotating block #4. | ||
|
||
; Test that --report_progress_every doesn't output anything with the default | ||
; value. | ||
; RUN: %convert_bhive_to_llvm_exegesis_input --asm_output_dir=%t.asmdir --bhive_csv=%t/test.csv 2>&1 | FileCheck %s --check-prefix=DEFAULT-VALUE | ||
|
||
; DEFAULT-VALUE-NOT: Finished annotating block | ||
|
||
;--- test.csv | ||
4183ff0119c083e00885c98945c4b8010000000f4fc139c2,298.000000 | ||
4889de4889c24c89ff,93.000000 | ||
48895d1844886520488945004889e84883c4085b5d415c415d,335.000000 | ||
418b4424084d8b3424498d2cc64939ee,98.000000 | ||
85c044897c2460,98.000000 |