You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we combine loads into a single load, we need to make sure that each load we're combining only has one use. We'd like to keep the invariant that if you do:
a := b[0]
...use a here...
...use a there...
then we're guaranteed that we use the same value of a in both places, regardless of races or whatever other nastiness is happening. In other words, we can't issue the b[0] load twice, we have to issue it only once and use the result for all occurrences of a.
The load combining rules currently violate that rule. We need to either make sure that all loads we're combining have only one use (the use of the combination value), or we extract the individual loads back from the combined load in case they are used elsewhere.
The obvious Uses==1 condition on the rewrite rule doesn't quite work, as mid-rewrite those loads have other dead uses that haven't been cleaned up yet. We need a more exact Uses count to make that condition work.
When we combine loads into a single load, we need to make sure that each load we're combining only has one use. We'd like to keep the invariant that if you do:
then we're guaranteed that we use the same value of
a
in both places, regardless of races or whatever other nastiness is happening. In other words, we can't issue theb[0]
load twice, we have to issue it only once and use the result for all occurrences ofa
.The load combining rules currently violate that rule. We need to either make sure that all loads we're combining have only one use (the use of the combination value), or we extract the individual loads back from the combined load in case they are used elsewhere.
The obvious Uses==1 condition on the rewrite rule doesn't quite work, as mid-rewrite those loads have other dead uses that haven't been cleaned up yet. We need a more exact Uses count to make that condition work.
@tzneal
The text was updated successfully, but these errors were encountered: