[all-commits] [llvm/llvm-project] c28a7c: [flang] Modifications to ieee_support_halting (#12...
vdonaldson via All-commits
all-commits at lists.llvm.org
Mon Dec 23 06:31:06 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c28a7c1efd89d3dbee5f7212313f836855dd08fd
https://github.com/llvm/llvm-project/commit/c28a7c1efd89d3dbee5f7212313f836855dd08fd
Author: vdonaldson <37090318+vdonaldson at users.noreply.github.com>
Date: 2024-12-23 (Mon, 23 Dec 2024)
Changed paths:
M flang/docs/Extensions.md
M flang/include/flang/Evaluate/target.h
M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
M flang/include/flang/Optimizer/Builder/Runtime/Exceptions.h
M flang/include/flang/Runtime/exceptions.h
M flang/include/flang/Tools/TargetSetup.h
M flang/lib/Evaluate/fold-logical.cpp
M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
M flang/lib/Optimizer/Builder/Runtime/Exceptions.cpp
M flang/runtime/exceptions.cpp
M flang/test/Evaluate/fold-ieee.f90
M flang/test/Lower/Intrinsics/ieee_flag.f90
Log Message:
-----------
[flang] Modifications to ieee_support_halting (#120747)
The F23 standard requires that a call to intrinsic module procedure
ieee_support_halting be foldable to a constant at compile time in some
contexts. See for example F23 Clause 10.1.11 [Specification expression]
list item (13), Clause 1.1.12 [Constant expression] list item (11), and
references to specification and constant expressions elsewhere, such as
constraints C1012, C853, and C704.
Some Arm processors allow a user to control processor behavior when an
arithmetic exception is signaled, and some Arm processors do not have
this capability. An Arm executable will run on either type of processor,
so it is effectively unknown at compile time whether or not this support
will be available at runtime. This in conflict with the standard
requirement.
This patch addresses this conflict by implementing ieee_support_halting
calls on Arm processors to check if this capability is present at
runtime. A call to ieee_support_halting in a constant context, such as
in the specification part of a program unit, will generate a compile
time "cannot be computed as a constant value" error. The expectation is
that such calls are unlikely to appear in production code.
Code generation for other processors will continue to generate a compile
time constant result for ieee_support_halting calls.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list