[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-16 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3152 +rounding mode. This option is experimental; the compiler may ignore an explicit +rounding mode in some situations. + sepavloff wrote: > andrew.w.kaylor wrote: > > You

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Since LLVM already has strict FP nodes, i'd personally like to see this RFC to not discuss "let's add XYZ", but discuss what features it targets to accomplish, what features are already achievable via strict FP nodes, and instead of adding a third set of FP

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3152 +rounding mode. This option is experimental; the compiler may ignore an explicit +rounding mode in some situations. + andrew.w.kaylor

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-15 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3127 The pragma can take three values: ``on``, ``fast`` and ``off``. The ``on`` option is identical to using ``#pragma STDC FP_CONTRACT(ON)`` and it allows This part of the

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2678 + auto *AnnotValue = new (PP.getPreprocessorAllocator()) TokFPAnnotValue; while (Tok.is(tok::identifier)) { sepavloff wrote: > aaron.ballman wrote: > > Might as well move

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2678 + auto *AnnotValue = new (PP.getPreprocessorAllocator()) TokFPAnnotValue; while (Tok.is(tok::identifier)) { aaron.ballman wrote: >

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This generally LGTM, but there are open questions on https://reviews.llvm.org/D66092#1625380 that I think need to be answered before this should be committed. Comment at: clang/lib/Parse/ParsePragma.cpp:2678 + auto *AnnotValue = new

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2697 PP.Lex(Tok); +StringRef ExpectedArgumentText; +switch (*FlagKind) { aaron.ballman wrote: > sepavloff wrote: > >

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 215134. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65997/new/ https://reviews.llvm.org/D65997 Files: clang/docs/LanguageExtensions.rst

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2697 PP.Lex(Tok); +StringRef ExpectedArgumentText; +switch (*FlagKind) { sepavloff wrote: > aaron.ballman wrote: > > Same here. > This case is different from the above,

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 7 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2697 PP.Lex(Tok); +StringRef ExpectedArgumentText; +switch (*FlagKind) { aaron.ballman wrote: > Same here. This case is

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 214750. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65997/new/ https://reviews.llvm.org/D65997 Files: clang/docs/LanguageExtensions.rst

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-09 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3151 +value ``dynamic`` informs the compiler that it must not assume particular +rounding mode. This option is experimental, compiler does not guarantee to +process it in all cases.

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3146 +The option ``rounding`` specifies rounding mode applied to floating point +operations. It may take one of the values: ``tonearest``, ``downward``, specifies rounding mode

[PATCH] D65997: Add options rounding and exceptions to pragma fp

2019-08-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: anemet, aaron.ballman, kpn, hfinkel, rsmith, rjmccall. Herald added a project: clang. Pragma 'clang fp' is extended to support two new options, 'rounding' and 'exceptions'. They allow to specifying floating point environment more