commit | 8506980d30fd2faf41518f24e985f820609a7bd0 | [log] [tgz] |
---|---|---|
author | Lucas Duarte Prates <lucas.prates@arm.com> | Mon Apr 28 10:01:54 2025 +0100 |
committer | GitHub <noreply@github.com> | Mon Apr 28 10:01:54 2025 +0100 |
tree | 34423603e6d0193a82df1f7bfb068c6c02241203 | |
parent | 1f69d6354a4b088bda5ee62c31411a75eead8b0c [diff] |
[Analysis] Ensure use of strict fp exceptions in ConstantFolding (#136139) To perform constant folding in math operations, the implementation of the ConstantFolding Analysis relies on the use of the math functions from the host's libm. In particular, it relies on checking the value of errno and IEEE exceptions to determine when an operation is safe to be constant-folded. On some platforms, such as BSD or Darwin, math library functions don't set errno, so the ConstantFolding check depends only on the value of IEEE exceptions. As the FP exception behaviour is set to `ignore` by default, the compiler can perform optimisations that would get in the way of such checks being performed correctly. This patch sets the FP exception behaviour to `strict` when compiling the `ConstantFolding.cpp` source file, ensuring the value of IEEE exceptions can be reliably used by its implementation.
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.