RFR(S) 8005956 : C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block

Niclas Adlertz niclas.adlertz at oracle.com
Fri May 24 05:32:19 PDT 2013


Hi all.

Problem:
Hitting the assert: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block in live.cpp

Background info:
When a reaching definition for a phi node is rematerialized (due to spilling) it's inserted in the end of the preceding block to the phi. On rare occasions this will cause the re-calculation of the liveness to fail. When phi nodes and their input are united in the end of the Chaitin::Split() method they get the same live range id. 

What happens in this case is that a reaching definition R for a phi node P has been rematerialized and put in a preceding block B. The input X to R will eventually get the same live range id as an earlier instruction Y in B. Look at [0] for a more detailed explanation.

Solution:
Disable re-materialization of reaching definitions for phi nodes when spilling. I've run refworkload with 12 iterations for baseline and new version, several times. The results vary a bit, not sure how  much refworkload runs usually vary. Roland also tried running refworkload on his x64 Linux to see if he could see any major regression. Thank you for helping me with this Roland. 

Results from x64 Linux (local machine) [1], x64 Linux (sthdev04) [2], sparcv9 Solaris (mrspock) [3], and Roland's x64 Linux [4].

WEBREV: http://cr.openjdk.java.net/~adlertz/JDK-8005956/webrev00/
JBS: https://jbs.oracle.com/bugs/browse/JDK-8005956

A review would be much appreciated. 
Thank you.

Kind Regards,
Niclas Adlertz

[0]: Output from the run (running test https://jbs.oracle.com/bugs/secure/attachment/11386/PolynomialRoot.java)
http://cr.openjdk.java.net/~adlertz/JDK-8005956/log.txt
Look at phi node 526, it has input nodes 527 and 1619. Node 527 has input node 528, which is the instruction prior to the reach 1716 (which has been rematerialized for phi node 558) in block 92. Node 1716 has input node 1619. 
When the unite step (found in the end of reg_split.cpp) unites the live range ids of phi nodes and their inputs, node 527 (recursively via phi node 528) and node 1619 will get the same live range id, resulting in the liveness to fail. 


[1] Results from x64 Linux (local machine) 2 runs

run 1:
============================================================================
refworkload_base: reference_server
  Benchmark         Samples        Mean     Stdev
  jetstream              12      185.27      0.03
    Write                12       71.42      0.04
    Parse                12       67.92      0.03
    Read                 12       17.25      0.10
    Copy                 12      102.17      0.02
  scimark                12     1438.69      0.00
    LU                   12     3213.92      0.01
    FFT                  12      211.00      0.02
    Monte                12      827.71      0.01
    SOR                  12     1365.90      0.00
    Sparse               12     1574.90      0.01
  specjbb2000            12   493245.44      0.00
    Last_Warehouse       12   493245.44      0.00
    First_Warehouse      12   118938.86      0.00
  specjbb2005            12   179117.61      0.00
    last                 12   179117.61      0.00
    interval_average     12    10536.25      0.00
    peak                 12   184040.52      0.01
    overall_average      12   164733.22      0.01
    last_warehouse       12        8.00      0.00
    peak_warehouse       12        4.25      0.11
    first                12    63494.80      0.00
  specjvm98              12     1020.02      0.01
    compress             12      817.54      0.00
    javac                12      598.70      0.01
    db                   12      407.37      0.02
    jack                 12     1299.66      0.03
    mtrt                 12     2904.37      0.02
    jess                 12     1089.06      0.02
    mpegaudio            12     1402.48      0.00
  volano25               12   183768.67      0.04
    time                 12        4.36      0.04
    connections          12      400.00      0.00
  --------------------------------------------------------------------------
  Weighted Geomean             23543.18
============================================================================
refworkload_new: reference_server
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  jetstream              12      198.41      0.05    7.09 0.001          Yes
    Write                12       69.92      0.03    2.10 0.154            *
    Parse                12       66.00      0.03    2.82 0.031            *
    Read                 12       15.83      0.14    8.21 0.098            *
    Copy                 12       89.67      0.02   12.23 0.000          Yes
  scimark                12     1443.71      0.00    0.35 0.009          Yes
    LU                   12     3236.61      0.00    0.71 0.012            *
    FFT                  12      211.73      0.02    0.34 0.628            *
    Monte                12      824.74      0.01   -0.36 0.159            *
    SOR                  12     1365.70      0.00   -0.01 0.908            *
    Sparse               12     1579.76      0.01    0.31 0.299            *
  specjbb2000            12   494276.38      0.01    0.21 0.384            *
    Last_Warehouse       12   494276.38      0.01    0.21 0.384            *
    First_Warehouse      12   118847.53      0.00   -0.08 0.548            *
  specjbb2005            12   179359.88      0.01    0.14 0.603            *
    last                 12   179359.87      0.01    0.14 0.603            *
    interval_average     12    10550.67      0.01    0.14 0.599            *
    peak                 12   184332.03      0.01    0.16 0.693            *
    overall_average      12   165145.86      0.01    0.25 0.393            *
    last_warehouse       12        8.00      0.00   -0.00 0.000            *
    peak_warehouse       12        4.00      0.00    5.88 0.082            *
    first                12    63653.25      0.01    0.25 0.162            *
  specjvm98              12     1026.25      0.00    0.61 0.003          Yes
    compress             12      817.55      0.00    0.00 0.998            *
    javac                12      602.40      0.02    0.62 0.317            *
    db                   12      406.46      0.01   -0.22 0.685            *
    jack                 12     1341.50      0.03    3.22 0.011            *
    mtrt                 12     2903.11      0.02   -0.04 0.951            *
    jess                 12     1099.14      0.01    0.93 0.087            *
    mpegaudio            12     1400.09      0.00   -0.17 0.150            *
  volano25               12   185056.42      0.04    0.70 0.660            *
    time                 12        4.33      0.04    0.68 0.666            *
    connections          12      400.00      0.00    0.00 0.000            *
  --------------------------------------------------------------------------
  Weighted Geomean             23787.81              1.04
============================================================================

run 2:
============================================================================
refworkload_base: reference_server
  Benchmark         Samples        Mean     Stdev
  jetstream              12      185.27      0.03
    Write                12       71.42      0.04
    Parse                12       67.92      0.03
    Read                 12       17.25      0.10
    Copy                 12      102.17      0.02
  scimark                12     1438.69      0.00
    LU                   12     3213.92      0.01
    FFT                  12      211.00      0.02
    Monte                12      827.71      0.01
    SOR                  12     1365.90      0.00
    Sparse               12     1574.90      0.01
  specjbb2000            12   493245.44      0.00
    Last_Warehouse       12   493245.44      0.00
    First_Warehouse      12   118938.86      0.00
  specjbb2005            12   179117.61      0.00
    last                 12   179117.61      0.00
    interval_average     12    10536.25      0.00
    peak                 12   184040.52      0.01
    overall_average      12   164733.22      0.01
    last_warehouse       12        8.00      0.00
    peak_warehouse       12        4.25      0.11
    first                12    63494.80      0.00
  specjvm98              12     1020.02      0.01
    compress             12      817.54      0.00
    javac                12      598.70      0.01
    db                   12      407.37      0.02
    jack                 12     1299.66      0.03
    mtrt                 12     2904.37      0.02
    jess                 12     1089.06      0.02
    mpegaudio            12     1402.48      0.00
  volano25               12   183768.67      0.04
    time                 12        4.36      0.04
    connections          12      400.00      0.00
  --------------------------------------------------------------------------
  Weighted Geomean             23543.18
============================================================================
refworkload_new: reference_server
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  jetstream              12      194.93      0.03    5.21 0.001          Yes
    Write                12       71.58      0.03   -0.23 0.858            *
    Parse                12       65.25      0.02    3.93 0.002          Yes
    Read                 12       16.75      0.13    2.90 0.534            *
    Copy                 12       89.50      0.02   12.40 0.000          Yes
  scimark                12     1444.04      0.00    0.37 0.011            *
    LU                   12     3231.07      0.01    0.53 0.084            *
    FFT                  12      211.94      0.01    0.44 0.521            *
    Monte                12      828.17      0.00    0.06 0.789            *
    SOR                  12     1367.63      0.00    0.13 0.266            *
    Sparse               12     1581.42      0.01    0.41 0.134            *
  specjbb2000            12   494674.94      0.00    0.29 0.077            *
    Last_Warehouse       12   494674.93      0.00    0.29 0.077            *
    First_Warehouse      12   118955.15      0.01    0.01 0.946            *
  specjbb2005            12   179408.72      0.01    0.16 0.442            *
    last                 12   179408.72      0.01    0.16 0.442            *
    interval_average     12    10553.50      0.01    0.16 0.439            *
    peak                 12   184116.40      0.01    0.04 0.903            *
    overall_average      12   164999.73      0.00    0.16 0.466            *
    last_warehouse       12        8.00      0.00   -0.00 0.000            *
    peak_warehouse       12        4.08      0.07    3.92 0.296            *
    first                12    63606.07      0.01    0.18 0.431            *
  specjvm98              12     1019.34      0.01   -0.07 0.780            *
    compress             12      817.54      0.00   -0.00 0.997            *
    javac                12      601.06      0.02    0.39 0.529            *
    db                   12      405.60      0.01   -0.44 0.447            *
    jack                 12     1313.88      0.02    1.09 0.267            *
    mtrt                 12     2860.55      0.01   -1.51 0.016            *
    jess                 12     1093.54      0.00    0.41 0.386            *
    mpegaudio            12     1396.44      0.01   -0.43 0.058            *
  volano25               12   182607.08      0.03   -0.63 0.663            *
    time                 12        4.39      0.03   -0.61 0.670            *
    connections          12      400.00      0.00    0.00 0.000            *
  --------------------------------------------------------------------------
  Weighted Geomean             23663.87              0.51
============================================================================


[2] x64 Linux (sthdev04):
============================================================================
refworkload_base: reference_server
  Benchmark         Samples        Mean     Stdev
  jetstream              12      266.06      0.05
    Write                12       90.00      0.02
    Parse                12       31.67      0.07
    Read                 12       19.83      0.15
    Copy                 12       35.92      0.05
  scimark                12     1792.69      0.00
    LU                   12     4221.96      0.00
    FFT                  12      396.07      0.01
    Monte                12      876.79      0.01
    SOR                  12     1473.68      0.00
    Sparse               12     1994.96      0.01
  specjbb2000            12   795853.13      0.01
    Last_Warehouse       12   795853.13      0.01
    First_Warehouse      12   116126.64      0.01
  specjbb2005            12   657436.88      0.01
    last                 12   657436.86      0.01
    interval_average     12    10114.42      0.01
    peak                 12   735806.35      0.01
    overall_average      12   610453.78      0.01
    last_warehouse       12        8.00      0.00
    peak_warehouse       12        2.50      0.21
    first                12    56556.37      0.01
  specjvm98              12     1037.04      0.02
    compress             12      831.64      0.01
    javac                12      465.49      0.08
    db                   12      515.11      0.01
    jack                 12     1398.88      0.02
    mtrt                 12     2614.33      0.11
    jess                 12     1195.19      0.04
    mpegaudio            12     1491.24      0.01
  volano25               12   509262.66      0.04
    time                 12        1.57      0.04
    connections          12      400.00      0.00
  --------------------------------------------------------------------------
  Weighted Geomean             46117.90
============================================================================
refworkload_new: reference_server
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  jetstream              12      271.15      0.04    1.91 0.294            *
    Write                12       88.00      0.02    2.22 0.015            *
    Parse                12       31.83      0.08   -0.53 0.869            *
    Read                 12       18.67      0.14    5.88 0.307            *
    Copy                 12       35.92      0.05   -0.00 1.000            *
  scimark                12     1798.19      0.00    0.31 0.006          Yes
    LU                   12     4240.68      0.00    0.44 0.002          Yes
    FFT                  12      399.76      0.02    0.93 0.150            *
    Monte                12      874.18      0.01   -0.30 0.242            *
    SOR                  12     1473.97      0.00    0.02 0.235            *
    Sparse               12     2002.35      0.01    0.37 0.332            *
  specjbb2000            12   787858.63      0.03   -1.00 0.290            *
    Last_Warehouse       12   787858.59      0.03   -1.00 0.290            *
    First_Warehouse      12   116645.31      0.02    0.45 0.572            *
  specjbb2005            12   657887.44      0.01    0.07 0.820            *
    last                 12   657887.45      0.01    0.07 0.820            *
    interval_average     12    10121.25      0.01    0.07 0.822            *
    peak                 12   737268.41      0.01    0.20 0.580            *
    overall_average      12   612183.21      0.01    0.28 0.318            *
    last_warehouse       12        8.00      0.00   -0.00 0.000            *
    peak_warehouse       12        2.67      0.18   -6.67 0.430            *
    first                12    56839.78      0.01    0.50 0.343            *
  specjvm98              12     1045.08      0.02    0.78 0.333            *
    compress             12      830.84      0.00   -0.10 0.671            *
    javac                12      487.46      0.09    4.72 0.192            *
    db                   12      518.01      0.01    0.56 0.041            *
    jack                 12     1440.04      0.03    2.94 0.010          Yes
    mtrt                 12     2569.15      0.08   -1.73 0.656            *
    jess                 12     1188.40      0.04   -0.57 0.742            *
    mpegaudio            12     1486.04      0.01   -0.35 0.184            *
  volano25               12   505473.50      0.02   -0.74 0.600            *
    time                 12        1.58      0.02   -0.60 0.674            *
    connections          12      400.00      0.00    0.00 0.000            *
  --------------------------------------------------------------------------
  Weighted Geomean             46149.13              0.07
============================================================================

[3] Results from sparcv9 solaris (mrspock):
============================================================================
refworkload_base: reference_server
  Benchmark         Samples        Mean     Stdev
  jetstream              12       36.03      0.01
    Copy                 12      258.08      0.00
    Parse                12      337.08      0.00
    Read                 12      126.67      0.04
    Write                12      538.83      0.00
  scimark                12       44.36      0.01
    Sparse               12       27.44      0.01
    LU                   12       51.53      0.02
    SOR                  12       80.13      0.01
    FFT                  12       14.28      0.00
    Monte                12       48.44      0.00
  specjbb2000            12    80257.23      0.00
    First_Warehouse      12    10756.41      0.01
    Last_Warehouse       12    80257.24      0.00
  specjbb2005            12   274794.56      0.02
    peak                 12   274794.56      0.02
    peak_warehouse       12        8.00      0.00
    last                 12   274794.56      0.02
    interval_average     12      535.58      0.02
    first                12     5079.05      0.02
    overall_average      12   121172.61      0.07
    last_warehouse       12        8.00      0.00
  specjvm98              12       81.51      0.01
    javac                12       58.26      0.01
    db                   12       54.68      0.03
    jess                 12       88.80      0.00
    jack                 12       41.98      0.01
    compress             12       87.66      0.00
    mtrt                 12      228.86      0.01
    mpegaudio            12      100.37      0.00
  volano25               12   114566.00      0.15
    connections          12      400.00      0.00
    time                 12        7.15      0.17
  --------------------------------------------------------------------------
  Weighted Geomean              6260.91
============================================================================
refworkload_new: reference_server
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  jetstream              12       35.91      0.00   -0.35 0.264            *
    Copy                 12      257.00      0.00    0.42 0.007          Yes
    Parse                12      347.33      0.01   -3.04 0.000          Yes
    Read                 12      125.75      0.00    0.72 0.528            *
    Write                12      536.00      0.00    0.53 0.000          Yes
  scimark                12       44.62      0.01    0.58 0.028            *
    Sparse               12       27.48      0.00    0.16 0.400            *
    LU                   12       51.82      0.01    0.57 0.487            *
    SOR                  12       81.20      0.01    1.34 0.001          Yes
    FFT                  12       14.26      0.01   -0.10 0.617            *
    Monte                12       48.34      0.00   -0.22 0.154            *
  specjbb2000            12    80075.02      0.01   -0.23 0.213            *
    First_Warehouse      12    10871.56      0.02    1.07 0.169            *
    Last_Warehouse       12    80075.01      0.01   -0.23 0.213            *
  specjbb2005            12   271688.31      0.03   -1.13 0.276            *
    peak                 12   271688.33      0.03   -1.13 0.276            *
    peak_warehouse       12        8.00      0.00   -0.00 0.000            *
    last                 12   271688.33      0.03   -1.13 0.276            *
    interval_average     12      529.75      0.03   -1.09 0.291            *
    first                12     5135.88      0.02    1.12 0.128            *
    overall_average      12   118168.54      0.05   -2.48 0.334            *
    last_warehouse       12        8.00      0.00   -0.00 0.000            *
  specjvm98              12       81.23      0.01   -0.34 0.221            *
    javac                12       57.66      0.01   -1.02 0.021            *
    db                   12       53.89      0.04   -1.44 0.278            *
    jess                 12       89.33      0.01    0.60 0.009          Yes
    jack                 12       41.75      0.01   -0.56 0.091            *
    compress             12       87.59      0.00   -0.07 0.545            *
    mtrt                 12      229.51      0.02    0.29 0.640            *
    mpegaudio            12      100.24      0.00   -0.13 0.453            *
  volano25               12   104635.84      0.21   -8.67 0.232            *
    connections          12      400.00      0.00    0.00 0.000            *
    time                 12        8.02      0.24  -12.16 0.208            *
  --------------------------------------------------------------------------
  Weighted Geomean              6128.92             -2.11
============================================================================


[4] Results from Roland's x64 Linux:
============================================================================
tbase: reference_server
  Benchmark         Samples        Mean     Stdev
  jetstream              12       84.09      0.04
    Copy                 12      952.42      0.05
    Parse                12       44.33      0.04
    Read                 12       15.00      0.03
    Write                12      320.33      0.16
  scimark                12      457.72      0.00
    Sparse               12      279.24      0.00
    LU                   12      702.48      0.00
    SOR                  12      764.40      0.00
    FFT                  12       32.23      0.00
    Monte                12      510.25      0.00
  specjbb2000            12   397041.59      0.01
    First_Warehouse      12    61010.62      0.01
    Last_Warehouse       12   397041.60      0.01
  specjbb2005            12   211800.03      0.01
    peak                 12   229864.05      0.01
    peak_warehouse       12        4.00      0.00
    last                 12   211800.03      0.01
    interval_average     12    12459.00      0.01
    first                12    36496.39      0.01
    overall_average      12   184620.84      0.01
    last_warehouse       12        8.00      0.00
  specjvm98              12      675.34      0.00
    javac                12      396.86      0.00
    db                   12      463.10      0.00
    jess                 12      671.13      0.01
    jack                 12      544.39      0.01
    compress             12      597.28      0.00
    mtrt                 12     1724.51      0.01
    mpegaudio            12      926.39      0.00
  volano25               12   161056.08      0.05
    connections          12      400.00      0.00
    time                 12        4.98      0.04
  --------------------------------------------------------------------------
  Weighted Geomean             16931.56
============================================================================
tniclas: reference_server
  Benchmark         Samples        Mean     Stdev   %Diff    P   Significant
  jetstream              12       88.03      0.02    4.68 0.003          Yes
    Copy                 12      866.75      0.07    8.99 0.001          Yes
    Parse                12       42.83      0.01    3.38 0.012            *
    Read                 12       14.83      0.04    1.11 0.431            *
    Write                12      303.67      0.02    5.20 0.291            *
  scimark                12      457.89      0.00    0.04 0.116            *
    Sparse               12      279.82      0.00    0.21 0.033            *
    LU                   12      702.76      0.00    0.04 0.122            *
    SOR                  12      764.59      0.00    0.02 0.636            *
    FFT                  12       32.28      0.00    0.15 0.098            *
    Monte                12      509.99      0.00   -0.05 0.127            *
  specjbb2000            12   398055.84      0.01    0.26 0.540            *
    First_Warehouse      12    61447.70      0.01    0.72 0.005          Yes
    Last_Warehouse       12   398055.85      0.01    0.26 0.540            *
  specjbb2005            12   212037.69      0.01    0.11 0.657            *
    peak                 12   230138.69      0.01    0.12 0.773            *
    peak_warehouse       12        4.00      0.00   -0.00 0.000            *
    last                 12   212037.69      0.01    0.11 0.657            *
    interval_average     12    12473.00      0.01    0.11 0.657            *
    first                12    36631.47      0.01    0.37 0.174            *
    overall_average      12   184966.28      0.01    0.19 0.529            *
    last_warehouse       12        8.00      0.00   -0.00 0.000            *
  specjvm98              12      673.85      0.00   -0.22 0.058            *
    javac                12      397.12      0.01    0.07 0.786            *
    db                   12      463.87      0.00    0.17 0.262            *
    jess                 12      667.62      0.01   -0.52 0.213            *
    jack                 12      543.46      0.01   -0.17 0.656            *
    compress             12      596.70      0.00   -0.10 0.306            *
    mtrt                 12     1704.44      0.01   -1.16 0.006          Yes
    mpegaudio            12      928.21      0.00    0.20 0.135            *
  volano25               12   162796.33      0.05    1.08 0.588            *
    connections          12      400.00      0.00    0.00 0.000            *
    time                 12        4.93      0.05    1.03 0.592            *
  --------------------------------------------------------------------------
  Weighted Geomean             17052.36              0.71
============================================================================



More information about the hotspot-compiler-dev mailing list