commit | aa612f3ade66b5dd3e95d028c0345a94c38e1ff8 | [log] [tgz] |
---|---|---|
author | Artem Pianykh <artem.pyanykh@gmail.com> | Thu Mar 13 17:18:12 2025 +0000 |
committer | GitHub <noreply@github.com> | Thu Mar 13 17:18:12 2025 +0000 |
tree | f7650d13ea21e742158387448bf872d07568ca28 | |
parent | 09d8e442ac2884aabe4cdfb01d1444b54cff7147 [diff] |
[NFC][Cloning] Replace DIFinder usage in CloneFunctionInto with a MetadataPredicate (#129148) Summary: The new code should be functionally identical to the old one (but faster). The reasoning is as follows. In the old code when cloning within the module: 1. DIFinder traverses and collects *all* debug info reachable from a function, its instructions, and its owning compile unit. 2. Then "compile units, types, other subprograms, and lexical blocks of other subprograms" are saved in a set. 3. Then when we MapMetadata, we traverse the function's debug info _again_ and those nodes that are in the set from p.2 are identity mapped. This looks equivalent to just doing step 3 with identity mapping based on a predicate that says to identity map "compile units, types, other subprograms, and lexical blocks of other subprograms" (same as in step 2). This is what the new code does. Test Plan: ninja check-all There's a bunch of tests around cloning and all of them pass.
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.