[PATCH] D64412: [Strict FP] Allow more relaxed scheduling

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 06:18:51 PDT 2019


uweigand created this revision.
uweigand added reviewers: andrew.w.kaylor, cameron.mcinally, kpn, kbarton, hfinkel.
Herald added subscribers: llvm-commits, MatzeB.
Herald added a project: LLVM.

Support for strict floating-point instructions at the DAG/MI level, as recently introduced in https://reviews.llvm.org/D55506, constrains instruction scheduling for such instruction to enforce their original source order.  While this mirrors the current requirements on strict FP intrinsics at the LLVM IR level, I believe this is really more strict than would be required to implement the semantics of strict FP.

Specifically, I believe it should be allowed to move one strict FP instructions across another, as long as it is not moved across any global barrier.    If both instructions were to raise a trapping FP exception, this means that you may now see another of those exceptions first, but that should still be OK.

This patch provides an alternative implementation in ScheduleDAGInstrs::buildSchedGraph that implements this relaxed constraint.  This means that instruction scheduling for strict FP instructions is now nearly as flexible as for standard FP instructions, removing a bit of the extra performance overhead.


Repository:
  rL LLVM

https://reviews.llvm.org/D64412

Files:
  lib/CodeGen/ScheduleDAGInstrs.cpp
  test/CodeGen/SystemZ/fp-strict-alias.ll
  test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64412.208659.patch
Type: text/x-patch
Size: 14252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190709/cdcf5aef/attachment.bin>


More information about the llvm-commits mailing list