[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

Melanie Blower via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 13:19:16 PDT 2021


mibintc updated this revision to Diff 337881.
mibintc retitled this revision from "[clang] RFC Support new builtin __arithmetic_fence to control floating point optiization" to "[clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens".
mibintc added a comment.

This is a minor change with only formatting changes, this patch is not yet ready for review, only discussion. 
Together with the llvm parent patch, this simple program can now run end-to-end

  clang -c -ffast-math test.c
  
  float addF(float x, float y) {
    return __arithmetic_fence(x + y);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100118/new/

https://reviews.llvm.org/D100118

Files:
  clang/include/clang/Basic/Builtins.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/ExprConstant.cpp
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/arithmetic-fence-builtin.c
  clang/test/Sema/arithmetic-fence-builtin.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100118.337881.patch
Type: text/x-patch
Size: 8278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210415/94832cd4/attachment.bin>


More information about the cfe-commits mailing list