| commit | b8930cd13d484fadc12b810d76156c2c9e884f75 | [log] [tgz] |
|---|---|---|
| author | Shubham Sandeep Rastogi <srastogi22@apple.com> | Mon Oct 21 18:13:49 2024 -0700 |
| committer | GitHub <noreply@github.com> | Mon Oct 21 18:13:49 2024 -0700 |
| tree | c2ad80a180c21d9b9fbbc962de6f791f3f417a1e | |
| parent | 1295d2e6da2fe90f3b770ab1d35bf5caecd38bed [diff] |
Add a pass to collect dropped variable statistics (#102233) This patch is inspired by @Snowy1803 excellent work in swift and the patch: https://github.com/swiftlang/swift/pull/73334/files Add an instrumentation pass to llvm to collect dropped debug information variable statistics for every Function-level and Module-level IR pass. This patch creates adds the class DroppedVariableStats which iterates over every DbgRecord in a function or module before and after an optimization pass and counts the number of variables who's debug information has been dropped due to that pass, then prints that output to stdout in a csv format. I ran this patch on optdriver.cpp can see: Pass Name, Dropped Variables 'InstCombinePass', 1 'SimplifyCFGPass', 6 'JumpThreadingPass', 25
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.