Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detects whether we have the Python modules (pygments, yaml) required by opt-viewer and hooks this up to REQUIRES. This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer testing). It's also related to apple/swift#12938 and the idea is to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake. Differential Revision: https://reviews.llvm.org/D40202 llvm-svn: 319073
- Loading branch information
Showing
12 changed files
with
1,152 additions
and
0 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
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,21 @@ | ||
void bar(); | ||
void foo() { bar(); } | ||
|
||
#include "or.h" | ||
|
||
void Test(int *res, int *c, int *d, int *p, int n) { | ||
int i; | ||
|
||
#pragma clang loop vectorize(assume_safety) | ||
for (i = 0; i < 1600; i++) { | ||
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; | ||
} | ||
|
||
for (i = 0; i < 16; i++) { | ||
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; | ||
} | ||
|
||
foo(); | ||
|
||
foo(); bar(); foo(); | ||
} |
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,16 @@ | ||
void TestH(int *res, int *c, int *d, int *p, int n) { | ||
int i; | ||
|
||
#pragma clang loop vectorize(assume_safety) | ||
for (i = 0; i < 1600; i++) { | ||
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; | ||
} | ||
|
||
for (i = 0; i < 16; i++) { | ||
res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; | ||
} | ||
|
||
foo(); | ||
|
||
foo(); bar(); foo(); | ||
} |
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,227 @@ | ||
--- !Missed | ||
Pass: inline | ||
Name: NoDefinition | ||
DebugLoc: { File: basic/or.c, Line: 2, Column: 14 } | ||
Function: foo | ||
Args: | ||
- Callee: bar | ||
- String: ' will not be inlined into ' | ||
- Caller: foo | ||
- String: ' because its definition is unavailable' | ||
... | ||
--- !Missed | ||
Pass: inline | ||
Name: NoDefinition | ||
DebugLoc: { File: basic/or.h, Line: 15, Column: 10 } | ||
Function: TestH | ||
Args: | ||
- Callee: bar | ||
- String: ' will not be inlined into ' | ||
- Caller: TestH | ||
- String: ' because its definition is unavailable' | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.h, Line: 13, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: TestH | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.h, Line: 13, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: TestH | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.h, Line: 15, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: TestH | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.h, Line: 15, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: TestH | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.h, Line: 15, Column: 17 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: TestH | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.h, Line: 15, Column: 17 } | ||
Function: TestH | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: TestH | ||
... | ||
--- !Passed | ||
Pass: loop-unroll | ||
Name: FullyUnrolled | ||
DebugLoc: { File: basic/or.h, Line: 9, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- String: 'completely unrolled loop with ' | ||
- UnrollCount: '16' | ||
- String: ' iterations' | ||
... | ||
--- !Missed | ||
Pass: inline | ||
Name: NoDefinition | ||
DebugLoc: { File: basic/or.c, Line: 20, Column: 10 } | ||
Function: Test | ||
Args: | ||
- Callee: bar | ||
- String: ' will not be inlined into ' | ||
- Caller: Test | ||
- String: ' because its definition is unavailable' | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.c, Line: 18, Column: 3 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: Test | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.c, Line: 18, Column: 3 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: Test | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.c, Line: 20, Column: 3 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: Test | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.c, Line: 20, Column: 3 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: Test | ||
... | ||
--- !Analysis | ||
Pass: inline | ||
Name: CanBeInlined | ||
DebugLoc: { File: basic/or.c, Line: 20, Column: 17 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' can be inlined into ' | ||
- Caller: Test | ||
- String: ' with cost=' | ||
- Cost: '30' | ||
- String: ' (threshold=' | ||
- Threshold: '412' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: inline | ||
Name: Inlined | ||
DebugLoc: { File: basic/or.c, Line: 20, Column: 17 } | ||
Function: Test | ||
Args: | ||
- Callee: foo | ||
- String: ' inlined into ' | ||
- Caller: Test | ||
... | ||
--- !Passed | ||
Pass: loop-unroll | ||
Name: FullyUnrolled | ||
DebugLoc: { File: basic/or.c, Line: 14, Column: 3 } | ||
Function: Test | ||
Args: | ||
- String: 'completely unrolled loop with ' | ||
- UnrollCount: '16' | ||
- String: ' iterations' | ||
... | ||
--- !Passed | ||
Pass: loop-vectorize | ||
Name: Vectorized | ||
DebugLoc: { File: basic/or.h, Line: 5, Column: 3 } | ||
Function: TestH | ||
Args: | ||
- String: 'vectorized loop (vectorization width: ' | ||
- VectorizationFactor: '4' | ||
- String: ', interleaved count: ' | ||
- InterleaveCount: '2' | ||
- String: ')' | ||
... | ||
--- !Passed | ||
Pass: loop-vectorize | ||
Name: Vectorized | ||
DebugLoc: { File: basic/or.c, Line: 10, Column: 3 } | ||
Function: Test | ||
Args: | ||
- String: 'vectorized loop (vectorization width: ' | ||
- VectorizationFactor: '4' | ||
- String: ', interleaved count: ' | ||
- InterleaveCount: '2' | ||
- String: ')' | ||
... |
Oops, something went wrong.