You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.205
Former-commit-id: 7f59f7e792705db773f1caecdaa823092f4e2927
This commit is contained in:
parent
5cd5df71cc
commit
8e12397d70
13
external/llvm/test/tools/llvm-opt-report/Inputs/dm.c
vendored
Normal file
13
external/llvm/test/tools/llvm-opt-report/Inputs/dm.c
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
void bar(void);
|
||||
void foo(int n) {
|
||||
if (n) { bar(); } else { while (1) {} }
|
||||
}
|
||||
|
||||
void quack(void) {
|
||||
foo(0);
|
||||
}
|
||||
|
||||
void quack2(void) {
|
||||
foo(4);
|
||||
}
|
||||
|
104
external/llvm/test/tools/llvm-opt-report/Inputs/dm.yaml
vendored
Normal file
104
external/llvm/test/tools/llvm-opt-report/Inputs/dm.yaml
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 3, Column: 12 }
|
||||
Function: foo
|
||||
Args:
|
||||
- Callee: bar
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: foo
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 2, Column: 0 }
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 7, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 2, Column: 0 }
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 6, Column: 0 }
|
||||
- String: ' with cost='
|
||||
- Cost: '-35'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '375'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 7, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 2, Column: 0 }
|
||||
- String: ' inlined into '
|
||||
- Caller: quack
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 6, Column: 0 }
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 11, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 2, Column: 0 }
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack2
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 10, Column: 0 }
|
||||
- String: ' with cost='
|
||||
- Cost: '-5'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '375'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 11, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 2, Column: 0 }
|
||||
- String: ' inlined into '
|
||||
- Caller: quack2
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 10, Column: 0 }
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CFGNotUnderstood
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 3, Column: 28 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: loop control flow is not understood by vectorizer
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 3, Column: 28 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: loop not vectorized
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CFGNotUnderstood
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 3, Column: 28 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: loop control flow is not understood by vectorizer
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/dm.c, Line: 3, Column: 28 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: loop not vectorized
|
||||
...
|
22
external/llvm/test/tools/llvm-opt-report/Inputs/or.c
vendored
Normal file
22
external/llvm/test/tools/llvm-opt-report/Inputs/or.c
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
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();
|
||||
}
|
||||
|
17
external/llvm/test/tools/llvm-opt-report/Inputs/or.h
vendored
Normal file
17
external/llvm/test/tools/llvm-opt-report/Inputs/or.h
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
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();
|
||||
}
|
||||
|
227
external/llvm/test/tools/llvm-opt-report/Inputs/or.yaml
vendored
Normal file
227
external/llvm/test/tools/llvm-opt-report/Inputs/or.yaml
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/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: Inputs/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: Inputs/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: Inputs/or.h, Line: 13, Column: 3 }
|
||||
Function: TestH
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: TestH
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/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: Inputs/or.h, Line: 15, Column: 3 }
|
||||
Function: TestH
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: TestH
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/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: Inputs/or.h, Line: 15, Column: 17 }
|
||||
Function: TestH
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: TestH
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/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: Inputs/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: Inputs/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: Inputs/or.c, Line: 18, Column: 3 }
|
||||
Function: Test
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: Test
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/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: Inputs/or.c, Line: 20, Column: 3 }
|
||||
Function: Test
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: Test
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/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: Inputs/or.c, Line: 20, Column: 17 }
|
||||
Function: Test
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: Test
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/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: Inputs/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: Inputs/or.c, Line: 10, Column: 3 }
|
||||
Function: Test
|
||||
Args:
|
||||
- String: 'vectorized loop (vectorization width: '
|
||||
- VectorizationFactor: '4'
|
||||
- String: ', interleaved count: '
|
||||
- InterleaveCount: '2'
|
||||
- String: ')'
|
||||
...
|
14
external/llvm/test/tools/llvm-opt-report/Inputs/q.c
vendored
Normal file
14
external/llvm/test/tools/llvm-opt-report/Inputs/q.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
void bar();
|
||||
void foo(int n) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
bar();
|
||||
}
|
||||
|
||||
void quack() {
|
||||
foo(4);
|
||||
}
|
||||
|
||||
void quack2() {
|
||||
foo(4);
|
||||
}
|
||||
|
14
external/llvm/test/tools/llvm-opt-report/Inputs/q.cpp
vendored
Normal file
14
external/llvm/test/tools/llvm-opt-report/Inputs/q.cpp
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
void bar();
|
||||
void foo(int n) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
bar();
|
||||
}
|
||||
|
||||
void quack() {
|
||||
foo(4);
|
||||
}
|
||||
|
||||
void quack2() {
|
||||
foo(4);
|
||||
}
|
||||
|
98
external/llvm/test/tools/llvm-opt-report/Inputs/q.yaml
vendored
Normal file
98
external/llvm/test/tools/llvm-opt-report/Inputs/q.yaml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/q.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- Callee: bar
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: foo
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q.c, Line: 3, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack2
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack2
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q.c, Line: 3, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CantVectorizeCall
|
||||
DebugLoc: { File: Inputs/q.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: call instruction cannot be vectorized
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/q.c, Line: 3, Column: 3 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: use -Rpass-analysis=loop-vectorize for more info'
|
||||
...
|
14
external/llvm/test/tools/llvm-opt-report/Inputs/q2.c
vendored
Normal file
14
external/llvm/test/tools/llvm-opt-report/Inputs/q2.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
void bar();
|
||||
void foo(int n) {
|
||||
for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
|
||||
bar();
|
||||
}
|
||||
|
||||
void quack() {
|
||||
foo(4);
|
||||
}
|
||||
|
||||
void quack2() {
|
||||
foo(4);
|
||||
}
|
||||
|
118
external/llvm/test/tools/llvm-opt-report/Inputs/q2.yaml
vendored
Normal file
118
external/llvm/test/tools/llvm-opt-report/Inputs/q2.yaml
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- Callee: bar
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: foo
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack
|
||||
- String: ' with cost='
|
||||
- Cost: '55'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 3, Column: 31 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 3, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack2
|
||||
- String: ' with cost='
|
||||
- Cost: '55'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack2
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 3, Column: 31 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 3, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CantVectorizeCall
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: call instruction cannot be vectorized
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/q2.c, Line: 3, Column: 31 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: use -Rpass-analysis=loop-vectorize for more info'
|
||||
...
|
14
external/llvm/test/tools/llvm-opt-report/Inputs/q3.c
vendored
Normal file
14
external/llvm/test/tools/llvm-opt-report/Inputs/q3.c
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
void bar();
|
||||
void foo(int n) {
|
||||
for (int i = 0; i < n; ++i)
|
||||
bar();
|
||||
}
|
||||
|
||||
void quack() {
|
||||
foo(4);
|
||||
}
|
||||
|
||||
void quack2() {
|
||||
foo(8);
|
||||
}
|
||||
|
98
external/llvm/test/tools/llvm-opt-report/Inputs/q3.yaml
vendored
Normal file
98
external/llvm/test/tools/llvm-opt-report/Inputs/q3.yaml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- Callee: bar
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: foo
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 8, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 3, Column: 3 }
|
||||
Function: quack
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' can be inlined into '
|
||||
- Caller: quack2
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 12, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- Callee: foo
|
||||
- String: ' inlined into '
|
||||
- Caller: quack2
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 3, Column: 3 }
|
||||
Function: quack2
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '8'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CantVectorizeCall
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 4, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: call instruction cannot be vectorized
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/q3.c, Line: 3, Column: 3 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'loop not vectorized: use -Rpass-analysis=loop-vectorize for more info'
|
||||
...
|
98
external/llvm/test/tools/llvm-opt-report/Inputs/qx.yaml
vendored
Normal file
98
external/llvm/test/tools/llvm-opt-report/Inputs/qx.yaml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 4, Column: 5 }
|
||||
Function: _Z3fooi
|
||||
Args:
|
||||
- Callee: _Z3barv
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: _Z3fooi
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 8, Column: 3 }
|
||||
Function: _Z5quackv
|
||||
Args:
|
||||
- Callee: _Z3fooi
|
||||
- String: ' can be inlined into '
|
||||
- Caller: _Z5quackv
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 8, Column: 3 }
|
||||
Function: _Z5quackv
|
||||
Args:
|
||||
- Callee: _Z3fooi
|
||||
- String: ' inlined into '
|
||||
- Caller: _Z5quackv
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 3, Column: 3 }
|
||||
Function: _Z5quackv
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: inline
|
||||
Name: CanBeInlined
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 12, Column: 3 }
|
||||
Function: _Z6quack2v
|
||||
Args:
|
||||
- Callee: _Z3fooi
|
||||
- String: ' can be inlined into '
|
||||
- Caller: _Z6quack2v
|
||||
- String: ' with cost='
|
||||
- Cost: '40'
|
||||
- String: ' (threshold='
|
||||
- Threshold: '275'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: inline
|
||||
Name: Inlined
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 12, Column: 3 }
|
||||
Function: _Z6quack2v
|
||||
Args:
|
||||
- Callee: _Z3fooi
|
||||
- String: ' inlined into '
|
||||
- Caller: _Z6quack2v
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 3, Column: 3 }
|
||||
Function: _Z6quack2v
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '4'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Analysis
|
||||
Pass: loop-vectorize
|
||||
Name: CantVectorizeCall
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 4, Column: 5 }
|
||||
Function: _Z3fooi
|
||||
Args:
|
||||
- String: 'loop not vectorized: '
|
||||
- String: call instruction cannot be vectorized
|
||||
...
|
||||
--- !Missed
|
||||
Pass: loop-vectorize
|
||||
Name: MissedDetails
|
||||
DebugLoc: { File: Inputs/q.cpp, Line: 3, Column: 3 }
|
||||
Function: _Z3fooi
|
||||
Args:
|
||||
- String: 'loop not vectorized: use -Rpass-analysis=loop-vectorize for more info'
|
||||
...
|
35
external/llvm/test/tools/llvm-opt-report/Inputs/sr2.c
vendored
Normal file
35
external/llvm/test/tools/llvm-opt-report/Inputs/sr2.c
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
** Write a 64-bit variable-length integer to memory starting at p[0].
|
||||
** The length of data write will be between 1 and 9 bytes. The number
|
||||
** of bytes written is returned.
|
||||
**
|
||||
** A variable-length integer consists of the lower 7 bits of each byte
|
||||
** for all bytes that have the 8th bit set and one byte with the 8th
|
||||
** bit clear. Except, if we get to the 9th byte, it stores the full
|
||||
** 8 bits and is the last byte.
|
||||
*/
|
||||
SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
|
||||
int i, j, n;
|
||||
u8 buf[10];
|
||||
if( v & (((u64)0xff000000)<<32) ){
|
||||
p[8] = v;
|
||||
v >>= 8;
|
||||
for(i=7; i>=0; i--){
|
||||
p[i] = (v & 0x7f) | 0x80;
|
||||
v >>= 7;
|
||||
}
|
||||
return 9;
|
||||
}
|
||||
n = 0;
|
||||
do{
|
||||
buf[n++] = (v & 0x7f) | 0x80;
|
||||
v >>= 7;
|
||||
}while( v!=0 );
|
||||
buf[0] &= 0x7f;
|
||||
assert( n<=9 );
|
||||
for(i=0, j=n-1; j>=0; j--, i++){
|
||||
p[i] = buf[j];
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
24
external/llvm/test/tools/llvm-opt-report/Inputs/sr2.yaml
vendored
Normal file
24
external/llvm/test/tools/llvm-opt-report/Inputs/sr2.yaml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
--- !Passed
|
||||
Pass: loop-vectorize
|
||||
Name: Vectorized
|
||||
DebugLoc: { File: Inputs/sr2.c,
|
||||
Line: 30, Column: 3 }
|
||||
Function: sqlite3VdbeExec
|
||||
Args:
|
||||
- String: 'vectorized loop (vectorization width: '
|
||||
- VectorizationFactor: '16'
|
||||
- String: ', interleaved count: '
|
||||
- InterleaveCount: '2'
|
||||
- String: ')'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: PartialUnrolled
|
||||
DebugLoc: { File: Inputs/sr2.c,
|
||||
Line: 30, Column: 3 }
|
||||
Function: sqlite3VdbeExec
|
||||
Args:
|
||||
- String: 'unrolled loop by a factor of '
|
||||
- UnrollCount: '2'
|
||||
- String: ' with run-time trip count'
|
||||
...
|
10
external/llvm/test/tools/llvm-opt-report/Inputs/unrl.c
vendored
Normal file
10
external/llvm/test/tools/llvm-opt-report/Inputs/unrl.c
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
void bar();
|
||||
|
||||
void foo() {
|
||||
for (int i = 0; i < 5; ++i)
|
||||
bar();
|
||||
|
||||
for (int i = 0; i < 11; ++i)
|
||||
bar();
|
||||
}
|
||||
|
42
external/llvm/test/tools/llvm-opt-report/Inputs/unrl.yaml
vendored
Normal file
42
external/llvm/test/tools/llvm-opt-report/Inputs/unrl.yaml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
--- !Missed
|
||||
Pass: inline
|
||||
Name: NoDefinition
|
||||
DebugLoc: { File: Inputs/unrl.c, Line: 5, Column: 5 }
|
||||
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: Inputs/unrl.c, Line: 8, Column: 5 }
|
||||
Function: foo
|
||||
Args:
|
||||
- Callee: bar
|
||||
- String: ' will not be inlined into '
|
||||
- Caller: foo
|
||||
- String: ' because its definition is unavailable'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/unrl.c, Line: 7, Column: 3 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '11'
|
||||
- String: ' iterations'
|
||||
...
|
||||
--- !Passed
|
||||
Pass: loop-unroll
|
||||
Name: FullyUnrolled
|
||||
DebugLoc: { File: Inputs/unrl.c, Line: 4, Column: 3 }
|
||||
Function: foo
|
||||
Args:
|
||||
- String: 'completely unrolled loop with '
|
||||
- UnrollCount: '5'
|
||||
- String: ' iterations'
|
||||
...
|
Reference in New Issue
Block a user