Reapply "[TableGen] Reduce number of call to FactorNodes. NFC" With more fixes to avoid deferencing a before_begin iterator. Original commit message: Previously we recursively called FactorNodes all the way down the tree any time FactorNodes was called. Additionally, on returning from the recursiion we would flatten any child ScopeMatchers into the parent. There are additional calls to FactorNodes every time a new ScopeMatcher is created. These calls cause a lot of visiting of parts of the tree that have already been factored as much as possible. We can remove the primary recursion by ensuring we flatten scopes when building a new ScopeMatcher. If the Matcher we are going to insert into the new ScopeMatcher is itself a ScopeMatcher, we add the children into the new ScopeMatcher instead. This makes the FactorNodes call for the newly created scope more powerful eliminating the need for the recursion
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.