Page MenuHomePhabricator

sassa.nf (Sassa Nf)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 7 2020, 10:38 PM (104 w, 5 d)

Recent Activity

Aug 10 2020

sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

What would be a main benefit for allowing out-of-order execution between instructions having no data dependency in a sequential program?

Aug 10 2020, 12:13 AM · Restricted Project

Aug 9 2020

sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

Excellent! Observability is key. If the value of n computed by the loop is not observable, the loop can be thrown out. If you want the computation in the loop to be observable, observe the n after the loop is done (or a bunch of other things that will work - like, call some "IO" or "OS" function).

Aug 9 2020, 7:17 AM · Restricted Project
sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

the compiled program must only exhibit behaviors that were possible behaviors of the source program

Aug 9 2020, 6:49 AM · Restricted Project
sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

I am going to add that the optimization is on the same lines as the more common case:

fn some_fn(y) {
   x = y % 42;
   if y < 0 return 0;
...
}

Modern CPUs will attempt to divide, compare and prefetch the code on the predicted success branch in parallel, as and when the corresponding processing units become available. That is, it is possible that for negative y the return of 0 will be observed by the caller before the division is completed. The simple consequence is that the only way you can detect that the division has not started, is to write the code that will test the division outcome.

Aug 9 2020, 3:24 AM · Restricted Project

Aug 8 2020

sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

In general, it is *not* valid for a compiler to remove an infinite loop.

Aug 8 2020, 12:04 PM · Restricted Project

Aug 7 2020

sassa.nf added a comment to D65718: [LangRef] Document forward-progress requirement.

I am unable to go through all the examples of infinite loops, but please consider that it is not so much about forward progress in many cases.

Aug 7 2020, 10:53 PM · Restricted Project