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

2023-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. `Dynamic` cannot have value `-1`, its value must fits 3 bits. Some targets encode rounding mode in instructions, RISCV is an example. It allows five "real" rounding modes, enlisted now in `RoundingMode` to be specified in a special field or FP instruction. This field

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

2023-09-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping. This enum should just match FLT_ROUNDS and designing ABI around whatever this was doing doesn't really make sense CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156989/new/ https://reviews.llvm.org/D156989 ___ cf

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

2023-08-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156989#4558486 , @sepavloff wrote: > Support of rounding mode in C standard is based on IEEE-754 model, where > rounding mode is a global state and affects all FP operations. The case of > two rounding modes does not fit this

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

2023-08-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D156989#4558134 , @arsenm wrote: > In D156989#4558133 , @sepavloff > wrote: > >> Rounding mode is presented in FPOptions with 3 bits, so there is only 8 >> values available for part

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

2023-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156989#4558133 , @sepavloff wrote: > Rounding mode is presented in FPOptions with 3 bits, so there is only 8 > values available for particular modes. 5 of them, which are specified in > IEEE-754, are listed in `RoundingMode`.

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

2023-08-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Rounding mode is presented in FPOptions with 3 bits, so there is only 8 values available for particular modes. 5 of them, which are specified in IEEE-754, are listed in `RoundingMode`. `Dynamic` (which is -1 in 3-bit numbers) is not a real rounding mode, it represents

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

2023-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 546815. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156989/new/ 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/TextNodeDu

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

2023-08-03 Thread Jay Foad via Phabricator via cfe-commits
foad added inline comments. Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:39 + // Special values. + Invalid = -2, + Lost the `///<` comment here. Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:41 + + ///< Denotes mode unknown

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

2023-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
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