abrown opened issue #3953:
In examining #3951 and #3934, the main problem in both cases seems to be that the load coalescing logic cannot detect when a loaded operand may be reused. Because of this, we must manually ensure that certain lowerings use
put_in_*
to avoid the problem. This is too manual and this error-prone (e.g., we unwittingly merged a regalloc error in #3951).As @cfallin notes in #3934:
Merging a load into an op that executes more than once is invalid in general (the two loads may observe different values, which violates the original program semantics because there was only one load originally).
So load coalescing should be prevented in cases where the operand is attempted to be loaded twice. If we could check how many times a value is used in
is_mergeable_load
, we could avoid the need to remember to useput_in_*
in these cases.
alexcrichton labeled issue #3953:
In examining #3951 and #3934, the main problem in both cases seems to be that the load coalescing logic cannot detect when a loaded operand may be reused. Because of this, we must manually ensure that certain lowerings use
put_in_*
to avoid the problem. This is too manual and this error-prone (e.g., we unwittingly merged a regalloc error in #3951).As @cfallin notes in #3934:
Merging a load into an op that executes more than once is invalid in general (the two loads may observe different values, which violates the original program semantics because there was only one load originally).
So load coalescing should be prevented in cases where the operand is attempted to be loaded twice. If we could check how many times a value is used in
is_mergeable_load
, we could avoid the need to remember to useput_in_*
in these cases.
alexcrichton labeled issue #3953:
In examining #3951 and #3934, the main problem in both cases seems to be that the load coalescing logic cannot detect when a loaded operand may be reused. Because of this, we must manually ensure that certain lowerings use
put_in_*
to avoid the problem. This is too manual and this error-prone (e.g., we unwittingly merged a regalloc error in #3951).As @cfallin notes in #3934:
Merging a load into an op that executes more than once is invalid in general (the two loads may observe different values, which violates the original program semantics because there was only one load originally).
So load coalescing should be prevented in cases where the operand is attempted to be loaded twice. If we could check how many times a value is used in
is_mergeable_load
, we could avoid the need to remember to useput_in_*
in these cases.
cfallin closed issue #3953:
In examining #3951 and #3934, the main problem in both cases seems to be that the load coalescing logic cannot detect when a loaded operand may be reused. Because of this, we must manually ensure that certain lowerings use
put_in_*
to avoid the problem. This is too manual and this error-prone (e.g., we unwittingly merged a regalloc error in #3951).As @cfallin notes in #3934:
Merging a load into an op that executes more than once is invalid in general (the two loads may observe different values, which violates the original program semantics because there was only one load originally).
So load coalescing should be prevented in cases where the operand is attempted to be loaded twice. If we could check how many times a value is used in
is_mergeable_load
, we could avoid the need to remember to useput_in_*
in these cases.
Last updated: Dec 23 2024 at 12:05 UTC