[llvm] Add a pass to collect dropped variable statistics (PR #102233)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 31 00:06:33 PDT 2024
rastogishubham wrote:
I have updated the patch to make the dropped variable statistics more accurate. We do not want to count a variable as dropped if the function that contained the dbg_val was eliminated due to dead code elimination. Do this by checking if the `InlinedAt` for a debug variable is in the `SubprogramToFunctionMap`, only if it exists, find a real instruction in the function obtained by the `SubprogramToFunctionMap` that has the same scope as the debug variable, if such an instruction exists, the debug variable has been dropped.
The new numbers for optdriver.cpp are:
SCCPPass: 48
InstCombinePass: 561
SimplifyCFGPass: 1306
JumpThreadingPass: 4087
ADCEPass: 24992
https://github.com/llvm/llvm-project/pull/102233
More information about the llvm-commits
mailing list