[PATCH] D55506: [RFC v2] Allow target to handle STRICT floating-point nodes

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 14 11:53:56 PST 2018


uweigand marked an inline comment as done.
uweigand added a comment.

In D55506#1331281 <https://reviews.llvm.org/D55506#1331281>, @cameron.mcinally wrote:

> This patch does seem FP exception centric and rounding mode agnostic though. Should `FPExcept` and friends be named something more general to cover both? To be clear, I'm okay with the current naming scheme, so just playing Devil's advocate.


Well, this is because I'm really only using this feature to handle exceptions (b.t.w. just like the MemOperands in the alternate attempt).

Rounding mode is handled completely in the back-end: we simply make all floating-point instructions (strict or not doesn't even matter here) use the FPC control register, and mark all instructions that change the rounding mode as changing FPC.  The one missing piece is that we need to mark all function calls to functions marked as within FENV_ACCESS ON regions as also clobbering FPC -- that can be done easily in the target ABI code as soon as the front-end marks such function calls (which we need anyway).


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

https://reviews.llvm.org/D55506





More information about the llvm-commits mailing list