aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authorLucas Duarte Prates <lucas.prates@arm.com>2025-04-29 15:24:52 +0100
committerGitHub <noreply@github.com>2025-04-29 15:24:52 +0100
commit67783eb166664cb0be9da01d1dc83178615a0575 (patch)
tree5f3a7721de46b45e2d87be2767d23ed9233f636c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
parent94dc0a0e7bc723af13a0923aa102fcc4d03c82a2 (diff)
downloadllvm-67783eb166664cb0be9da01d1dc83178615a0575.zip
llvm-67783eb166664cb0be9da01d1dc83178615a0575.tar.gz
llvm-67783eb166664cb0be9da01d1dc83178615a0575.tar.bz2
Re-land: [Analysis] Ensure use of strict fp exceptions in ConstantFolding (#137652)
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. This re-lands the changes from #136139, but using the `-ftrapping-math` compile option instead of `-ffp-exception-behavior` for GCC support.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
0 files changed, 0 insertions, 0 deletions