Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Debugify] Add -debugify-each for testing each pass in a pipeline
This adds a -debugify-each mode to opt which, when enabled, wraps each {Module,Function}Pass in a pipeline with logic to add, check, and strip synthetic debug info for testing purposes. This mode can be used to test complex pipelines for debug info bugs, or to collect statistics about the number of debug values & locations lost throughout various stages of a pipeline. Patch by Son Tuan Vu! Differential Revision: https://reviews.llvm.org/D46525 llvm-svn: 332312
- Loading branch information
Showing
8 changed files
with
218 additions
and
58 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
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,24 @@ | ||
; RUN: opt -debugify-each -O3 -S -o - < %s | FileCheck %s | ||
; RUN: opt -debugify-each -instrprof -sroa -sccp -S -o - < %s | FileCheck %s | ||
|
||
define void @foo() { | ||
ret void | ||
} | ||
|
||
define void @bar() { | ||
ret void | ||
} | ||
|
||
; Verify that the module & function (check-)debugify passes run at least twice. | ||
|
||
; CHECK-DAG: CheckModuleDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
|
||
; CHECK-DAG: CheckModuleDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS | ||
; CHECK-DAG: CheckFunctionDebugify: PASS |
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
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
Oops, something went wrong.