| commit | 2e9f8696e9533fdd464e025bd504302fa1a22f14 | [log] [tgz] |
|---|---|---|
| author | Justin Fargnoli <justinfargnoli@gmail.com> | Thu Nov 14 09:56:22 2024 -0800 |
| committer | GitHub <noreply@github.com> | Thu Nov 14 09:56:22 2024 -0800 |
| tree | 6c111215264ce0bb002820fc9729cd3d586bc7ff | |
| parent | 0019565e9322350145c2b3bbc06a3a042f3a8ee1 [diff] |
Reland "[LLVM] Add IRNormalizer Pass" (#113780) `IRNormalizer` will reorder instructions. Thus, we need to invalidate analyses. Done in cd500d28cba3177c213f2f2faf50f14ea56e230b. This should resolve the [BuildBot failure](https://github.com/llvm/llvm-project/pull/68176#issuecomment-2428243474). --- Original PR: #68176 Original commit: 1295d2e6da2fe90f3b770ab1d35bf5caecd38bed Reverted with: 8a12e0131f3d84b470fac63af042aa96a1b19f56 --- Add the llvm-canon tool. Description from the [original PR](https://reviews.llvm.org/D66029#change-wZv3yOpDdxIu): > Added a new llvm-canon tool which aims to transform LLVM Modules into a canonical form by reordering and renaming instructions while preserving the same semantics. This tool makes it easier to spot semantic differences while diffing two modules which have undergone different transformation passes. The current version of this tool can: - Reorder instructions within a function. - Rename instructions based on the operands. - Sort commutative operands. This code was originally written by @michalpaszkowski and [submitted to mainline LLVM](https://github.com/llvm/llvm-project/commit/14d358537f124a732adad1ec6edf3981dc9baece). However, it was quickly [reverted](https://github.com/llvm/llvm-project/commit/335de55fa3384946f1e62050f2545c0966163236) to do BuildBot errors. Michal presented his version of the tool in [LLVM-Canon: Shooting for Clear Diffs](https://www.youtube.com/watch?v=c9WMijSOEUg). @AidanGoldfarb and I ported the code to the new pass manager, added more tests, and fixed some bugs related to PHI nodes that may have been the root cause of the BuildBot errors that caused the patch to be reverted. Additionally, we rewrote the implementation of instruction reordering to fix cases where the original algorithm would break use-def chains. Note that this is @AidanGoldfarb and I's first time submitting to LLVM. Please liberally critique the PR! CC @plotfi for initial review. --------- Co-authored-by: Aidan <aidan.goldfarb@mail.mcgill.ca>
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.