Skip to content

Conversation

@meg-gupta
Copy link
Contributor

The assert says that for a hoistable value, if its valuetype is primitive in the loop landing pad, it should be atleast LikelyPrimitive inside the loop.
This assert does not hold true in a few cases when we force specialize syms in the loop landing pad.
Ex :

landingPad:
a = v1;
b = v1;
loop :
b = v2; // forces float conversion in landing pad
c = a;
jump loop

During force specializing in loop landing pad of b, both a and b have the same valueinfo, so they transition to a DefiniteFloat.
This takes b to definite float in the loop landing pad but not inside the loop.
We do not have a way to force Specialize a in the loop, we cannot assume force specializing b again in the loop will update the valueInfo of a,
because they may have different value numbers in the loop. Since we don't have a way to lookup values by valueNumber, there is no easy way to fix this gap currently.

Added test to keep track of this gap.

@meg-gupta meg-gupta requested a review from LouisLaf July 27, 2018 18:39
The assert says that for a hoistable value, if its valuetype is primitive in the loop landing pad, it should be atleast LikelyPrimitive inside the loop.
This assert does not hold true in a few cases when we force specialize syms in the loop landing pad.
Ex :

  landingPad:
    a = v1;
    b = v1;
  loop :
    b = v2; // forces float conversion in landing pad
    c = a;
  jump loop

During force specializing in loop landing pad of b, both a and b have the same valueinfo, so they transition to a DefiniteFloat.
This takes b to definite float in the loop landing pad but not inside the loop.
We do not have a way to force Specialize a in the loop, we cannot assume force specializing b again in the loop will update the valueInfo of a,
because they may have different value numbers in the loop. Since we don't have a way to lookup values by valueNumber, there is no easy way to fix this gap currently.

Added test to keep track of this gap.
@meg-gupta meg-gupta requested a review from rajatd July 27, 2018 18:41
@LouisLaf
Copy link
Collaborator

LGTM!

@meg-gupta
Copy link
Contributor Author

@dotnet-bot test Windows 10 ci_slow_x64_debug

@chakrabot chakrabot merged commit dc2b440 into chakra-core:release/1.10 Jul 27, 2018
chakrabot pushed a commit that referenced this pull request Jul 27, 2018
… for hoistable syms

Merge pull request #5547 from meg-gupta:disableassert

The assert says that for a hoistable value, if its valuetype is primitive in the loop landing pad, it should be atleast LikelyPrimitive inside the loop.
This assert does not hold true in a few cases when we force specialize syms in the loop landing pad.
Ex :

  landingPad:
    a = v1;
    b = v1;
  loop :
    b = v2; // forces float conversion in landing pad
    c = a;
  jump loop

During force specializing in loop landing pad of b, both a and b have the same valueinfo, so they transition to a DefiniteFloat.
This takes b to definite float in the loop landing pad but not inside the loop.
We do not have a way to force Specialize a in the loop, we cannot assume force specializing b again in the loop will update the valueInfo of a,
because they may have different value numbers in the loop. Since we don't have a way to lookup values by valueNumber, there is no easy way to fix this gap currently.

Added test to keep track of this gap.
chakrabot pushed a commit that referenced this pull request Jul 27, 2018
…luetype assert for hoistable syms

Merge pull request #5547 from meg-gupta:disableassert

The assert says that for a hoistable value, if its valuetype is primitive in the loop landing pad, it should be atleast LikelyPrimitive inside the loop.
This assert does not hold true in a few cases when we force specialize syms in the loop landing pad.
Ex :

  landingPad:
    a = v1;
    b = v1;
  loop :
    b = v2; // forces float conversion in landing pad
    c = a;
  jump loop

During force specializing in loop landing pad of b, both a and b have the same valueinfo, so they transition to a DefiniteFloat.
This takes b to definite float in the loop landing pad but not inside the loop.
We do not have a way to force Specialize a in the loop, we cannot assume force specializing b again in the loop will update the valueInfo of a,
because they may have different value numbers in the loop. Since we don't have a way to lookup values by valueNumber, there is no easy way to fix this gap currently.

Added test to keep track of this gap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants