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

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 07:32:03 PDT 2019


cameron.mcinally accepted this revision.
cameron.mcinally added a comment.
This revision is now accepted and ready to land.

In D64412#1587016 <https://reviews.llvm.org/D64412#1587016>, @uweigand wrote:

> This patch would add the additional option of also changing the relative order of the two strict_fmul operations.


I now see that the IEEE-754 Standard allows for expression transformations that change the order of setting flags, so that should be fine for statements too.

  The following value-changing transformations, among others, preserve the literal meaning of the source code:
  <...snip...>
  ― Changing the order in which different flags are raised.



> I do not think there is much point in attempting to guarantee the relative order of FP vs. memory instructions, since those memory instructions are themselves not guaranteed (the C/C++ standard allows memory accesses to be rather freely rescheduled, or even fully omitted).
> 
> If relative order of FP vs. memory instructions is an issue to your application, you'll have to use volatile (or atomic) memory accesses; in that case, both the current implementation and my patch will respect the ordering.

That's fair. I don't see anything explicitly disallowing it, so can't argue.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64412





More information about the llvm-commits mailing list