| commit | 4a873d58df755d220889b994f59cbdea2cdefc49 | [log] [tgz] |
|---|---|---|
| author | Nikita Popov <npopov@redhat.com> | Tue Sep 30 16:16:42 2025 +0200 |
| committer | GitHub <noreply@github.com> | Tue Sep 30 16:16:42 2025 +0200 |
| tree | 91032efb7948f8b90eb0d585fa34cfbf9a16e189 | |
| parent | cf50bbf983c6ff032c7ad0de27ffaff412947ffb [diff] |
[IR] Don't create ptrtoint expression to determine alignment (NFCI) (#161364) We try to determine the alignment of a constant by creating a ptrtoint expression and seeing if it folds. I believe the only case this can actually handle is where the constant is an inttoptr expression. Handle that directly instead of going through another ptrtoint expression. I ran into this while trying to clean up our isEliminableCastPair() mess, which is going to disable ptrtoint(inttoptr) folding without DataLayout, breaking this code.
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.