[PATCH] D156989: FloatingPointMode: Use -1 for "Dynamic"

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 04:50:17 PDT 2023


arsenm created this revision.
arsenm added reviewers: sepavloff, rjmccall, kpn, cameron.mcinally, uweigand, scanon, jcranmer-intel, foad.
Herald added subscribers: StephenFan, tpr.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

FLT_ROUNDS says -1 is used for "the default rounding direction is not
known". The previous 7 was taking away options in the
"implementation-defined behavior" range if you just wanted to extend
the enum.

      

AMDGPU has 2 separately controllable rounding modes that change
different fp types. I want to stick to the standard values in the case
the modes are the same, and use the extended range for cases where the
two are different. Dodging this gap in the enum value required
defining the AMDGPU target specific values in a weird way with strange
conversion code to handle it (see https://reviews.llvm.org/D153257).


https://reviews.llvm.org/D156989

Files:
  clang/include/clang/Basic/FPOptions.def
  clang/include/clang/Basic/LangOptions.h
  clang/lib/AST/JSONNodeDumper.cpp
  clang/lib/AST/TextNodeDumper.cpp
  clang/lib/Basic/LangOptions.cpp
  llvm/include/llvm/ADT/FloatingPointMode.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156989.546801.patch
Type: text/x-patch
Size: 9192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230803/1f031839/attachment.bin>


More information about the cfe-commits mailing list