mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-23 20:44:51 +00:00
0837bf4c51
How code is optimized sometimes, perhaps often, depends on the context into which it was inlined. This change allows llvm-opt-report to track the differences between the optimizations performed, or not, in different contexts, and when these differ, display those differences. For example, this code: $ cat /tmp/q.cpp void bar(); void foo(int n) { for (int i = 0; i < n; ++i) bar(); } void quack() { foo(4); } void quack2() { foo(4); } will now produce this report: < /home/hfinkel/src/llvm/test/tools/llvm-opt-report/Inputs/q.cpp 2 | void bar(); 3 | void foo(int n) { [[ > foo(int): 4 | for (int i = 0; i < n; ++i) > quack(), quack2(): 4 U4 | for (int i = 0; i < n; ++i) ]] 5 | bar(); 6 | } 7 | 8 | void quack() { 9 I | foo(4); 10 | } 11 | 12 | void quack2() { 13 I | foo(4); 14 | } 15 | Note that the tool has demangled the function names, and grouped the reports associated with line 4. This shows that the loop on line 4 was unrolled by a factor of 4 when inlined into the functions quack() and quack2(), but not in the function foo(int) itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283402 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
dsymutil | ||
gold | ||
llvm-ar | ||
llvm-config | ||
llvm-cov | ||
llvm-cxxdump | ||
llvm-dwp | ||
llvm-lit | ||
llvm-lto | ||
llvm-lto2 | ||
llvm-mc | ||
llvm-nm | ||
llvm-objdump | ||
llvm-opt-report | ||
llvm-pdbdump | ||
llvm-profdata | ||
llvm-readobj | ||
llvm-size | ||
llvm-split | ||
llvm-symbolizer | ||
lto | ||
sancov | ||
sanstats | ||
yaml2obj |