[llvm] Add a pass to collect dropped var stats for MIR. (PR #115566)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 15:31:52 PST 2024
rastogishubham wrote:
This is a part of a stack of patches, with https://github.com/llvm/llvm-project/pull/115563 being the first one.
When I run the MIR stats on SemaExpr.cpp.o with the command line:
```
clang++ -g -O3 -mllvm -dropped-variable-stats-mir -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/shubham/Development/llvm-project/build_ninja/tools/clang/lib/Sema -I/Users/shubham/Development/llvm-project/clang/lib/Sema -I/Users/shubham/Development/llvm-project/clang/include -I/Users/shubham/Development/llvm-project/build_ninja/tools/clang/include -I/Users/shubham/Development/llvm-project/build_ninja/include -I/Users/shubham/Development/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -DNDEBUG -std=c++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o -MF tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o.d -o tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o -c /Users/shubham/Development/llvm-project/clang/lib/Sema/SemaExpr.cpp
```
I get the results:
'Early Tail Duplication', 12
'Branch Probability Basic Block Placement', 48
'Control Flow Optimizer', 152
https://github.com/llvm/llvm-project/pull/115566
More information about the llvm-commits
mailing list