File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 11# Loop Analyzer
2- ## Setup
3- Build using ` ninja clang loop-analyzer `
2+ ## Build Project
3+ Build using: ` ninja clang loop-analyzer ` .
44## CL Usage
5- 1 . Compile with clang, turn on profile training
5+ ### Build Codebase to Analyze
6+
7+ 1 . Compile once with clang, turn on profiling options
8+ ```
9+ clang++ -fprofile-instr-generate <file.c> && a.out
10+ ```
11+ 2 . Run with profile information
612```
7- clang++ -
13+ LLVM_PROFILE_FILE=a.profraw ./a.out
14+ ```
15+ 3 . Process raw profiling data
16+ ```
17+ llvm-profdata a.profraw -o a.profdata
818```
9- 1 .
1019
11- 2 . Compile with clang, with profiling information
20+ ### Analyze Build
21+ 4 . Build again using profile information
1222```
13- clang++ -fsave-optimization-record=bitstream -foptimization-record-passes=loop-extract-analysis [other-flags] <filename > -o <output_filename>
23+ clang -fprofile-instr-use=a.profdata <file.c > -o a.profile.out
1424```
15- 2 . Extract Remarks
25+
26+ 5 . Extract Remarks
1627```
17- dsymutil <output_filename>
28+ dsymutil a.profile.out
1829```
19- 3 . Loop Analysis
30+ 6 . Loop Analysis
2031```
2132loop-analyzer <output_filename>.dSYM/Contents/Resources/Remarks/<output_filename>
2233```
2334
2435## Program Description
2536
26- When we run the ` loop-extract-analysis ` pass, we are emiting a remark for each loop in the program. Our ` loop-analyzer `
37+ <!-- When we run the `loop-extract-analysis` pass, we are emiting a remark for each loop in the program. Our `loop-analyzer` -->
You can’t perform that action at this time.
0 commit comments