[PATCH] D71742: Added intrinsics for access to FP environment

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 22:53:56 PST 2019


sepavloff created this revision.
sepavloff added reviewers: hfinkel, kpn, andrew.w.kaylor, efriedma, bkramer, cameron.mcinally, uweigand.
Herald added subscribers: jdoerfert, hiraditya.
Herald added a project: LLVM.
sepavloff added a parent revision: D71741: Add size of FP environment to DataLayout.

The change implements intrinsics 'get_fenv', 'set_fenv' and
'reset_fenv'. They are necessary to support programs where different
parts are executed in different FP environment.

Now these functions are lowered to calls of C library functions
'fegetenv' and 'fesetenv'. It is expected that targets will implement
custom lowering to proper machine instructions for better performance.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71742

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/include/llvm/IR/IRBuilder.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/RuntimeLibcalls.def
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/Generic/fpenv.ll
  llvm/unittests/IR/IRBuilderTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71742.234828.patch
Type: text/x-patch
Size: 18085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191220/2d8e8984/attachment.bin>


More information about the llvm-commits mailing list