x86 backend update

Stephen Weeks MLton@sourcelight.com
Mon, 20 Nov 2000 15:01:21 -0800 (PST)


> Here's a stable version of the x86backend. 

I've integrated your stuff.  No problems, typechecking at least.

I tried to do a self compile with the new native backend, and it seems at the
very least to be a lot slower, at the worst, nonterminating.  It's been running
for 2.5 hours, and is still sitting in the backend.  This is a G0 building a G1, 
so asserts will be turned on.  Do you think asserts are prohibitively slow for a 
self compile?  Any other ideas?  Here is the transcript.

--------------------------------------------------------------------------------

cd /home/sweeks/mlton/src/mlton && make
make[1]: Entering directory `/home/sweeks/mlton/src/mlton'
Compiling mlton (takes a while)
time mlton -v -no-polyvariance mlton.cm
MLton internal-version (built Mon Nov 20 12:31:11 2000 on eponym.epr.com)
  created this file on Mon Nov 20 12:32:14 2000.
Do not edit this file.
Flag settings: 
   aux: false
   chunk: coalesce 2000
   contify strategy: OneCall
   defines: [NODEBUG]
   fixed heap: None
   indentation: 3
   includes: [mlton.h]
   inline: NonRecursive {product = 320,small = 60}
   input file: mlton.cm
   instrument: false
   instrument Sxml: false
   keep Cps: false
   match: left to right
   messages: true
   native-commented: 0
   native-copy-prop: true
   native-ieee-fp: false
   native-move-hoist: true
   native: true
   native-optimize: 1
   native-split: Some(100000)
   polyvariance: None
   print at fun entry: false
   profile: false
   show types: false
compile starting
   numPeeks = 196951
   average position in bucket = 0.189
   parse and elaborate starting
   parse and elaborate finished in 135.650
   core-ml size is ~1 bytes
   numPeeks = 14
   average position in property list = 0.000
   numPeeks = 2448570
   average position in bucket = 0.221
   dead starting
   dead finished in 0.330
   basis size is ~1 bytes
   numPeeks = 72736
   average position in property list = 0.000
   numPeeks = 2448570
   average position in bucket = 0.221
   size = 187300
   gcc -DNODEBUG -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileSQsXGf /tmp/fileyKf5UH.c -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
   /tmp/fileSQsXGf /tmp/fileSYlyqZ
   infer starting
      unification starting
      unification finished in 17.620
      finish infer starting
      finish infer finished in 64.090
   infer finished in 82.930
   xml.unsimplified size is ~1 bytes
   numPeeks = 1077199
   average position in property list = 0.000
   numPeeks = 2587277
   average position in bucket = 0.273
   typeCheck starting
   typeCheck finished in 15.190
   infer simplify starting
   infer simplify finished in 39.770
   xml size is ~1 bytes
   numPeeks = 5344872
   average position in property list = 0.466
   numPeeks = 2749927
   average position in bucket = 0.343
   typeCheck starting
   typeCheck finished in 10.220
   size = 121710
   num types in program = 20381
   num types in table = 36968
   hash table size is ~1 bytes
   mono starting
   mono finished in 84.290
   mono.unsimplified size is ~1 bytes
   numPeeks = 10275477
   average position in property list = 0.242
   numPeeks = 3576588
   average position in bucket = 0.665
   typeCheck starting
   typeCheck finished in 12.810
   mono simplify starting
   mono simplify finished in 50.880
   mono size is ~1 bytes
   numPeeks = 15640947
   average position in property list = 0.374
   numPeeks = 3671904
   average position in bucket = 0.691
   typeCheck starting
   typeCheck finished in 10.260
   size = 186638
   num types in program = 12917
   num types in table = 67400
   hash table size is ~1 bytes
   implement exceptions starting
   implement exceptions finished in 1.760
   sxml.unsimplified size is ~1 bytes
   numPeeks = 16490574
   average position in property list = 0.355
   numPeeks = 3746776
   average position in bucket = 0.713
   typeCheck starting
   typeCheck finished in 10.870
   implement exceptions simplify starting
   implement exceptions simplify finished in 37.630
   sxml size is ~1 bytes
   numPeeks = 20481005
   average position in property list = 0.398
   numPeeks = 3822359
   average position in bucket = 0.734
   typeCheck starting
   typeCheck finished in 9.860
   polyvariance starting
   polyvariance finished in 0.000
   sxml.poly size is ~1 bytes
   numPeeks = 21008130
   average position in property list = 0.388
   numPeeks = 3893897
   average position in bucket = 0.754
   size = 174662
   num types in program = 12473
   num types in table = 67856
   hash table size is ~1 bytes
   closure convert starting
      flow analysis starting
      flow analysis finished in 8.920
      flow size is ~1 bytes
      numPeeks = 22029304
      average position in property list = 0.370
      numPeeks = 3910142
      average position in bucket = 0.756
      free variables starting
      free variables finished in 2.880
      globalize starting
      globalize finished in 3.080
      convert starting
      convert finished in 109.380
   closure convert finished in 126.630
   cps.unsimplified size is ~1 bytes
   numPeeks = 28532774
   average position in property list = 1.405
   numPeeks = 4260997
   average position in bucket = 0.801
   typeCheck starting
      checkScopes starting
	 inferHandlers starting
	 inferHandlers finished in 6.850
      checkScopes finished in 16.550
   typeCheck finished in 37.240
   closure convert simplify starting
      simplify starting
	 num functions 11851
	 num local functions 134891
	 num primExps 152760
	 numPeeks = 32388911
	 average position in property list = 1.246
	 numPeeks = 4341739
	 average position in bucket = 0.809
	 remove-unused starting
	 remove-unused finished in 7.250
	 num functions 10231
	 num local functions 77930
	 num primExps 135821
	 numPeeks = 35449535
	 average position in property list = 1.140
	 numPeeks = 4342061
	 average position in bucket = 0.809
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.860
	    checkScopes finished in 10.420
	 typeCheck finished in 26.050
	 leaf-inline starting
	    inline starting
	    inline finished in 23.540
	 leaf-inline finished in 23.540
	 num functions 7725
	 num local functions 55575
	 num primExps 135469
	 numPeeks = 39464111
	 average position in property list = 1.033
	 numPeeks = 4415606
	 average position in bucket = 0.817
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.800
	    checkScopes finished in 6.560
	 typeCheck finished in 20.600
	 raise-to-jump starting
	    inferHandlers starting
	    inferHandlers finished in 2.730
	 raise-to-jump finished in 20.930
	 num functions 7725
	 num local functions 55206
	 num primExps 135442
	 numPeeks = 42856497
	 average position in property list = 0.959
	 numPeeks = 4502300
	 average position in bucket = 0.825
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.690
	    checkScopes finished in 6.400
	 typeCheck finished in 20.430
	 contify starting
	 contify finished in 19.160
	 num functions 4443
	 num local functions 55518
	 num primExps 133774
	 numPeeks = 46100208
	 average position in property list = 0.896
	 numPeeks = 4592251
	 average position in bucket = 0.834
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.680
	    checkScopes finished in 6.370
	 typeCheck finished in 20.040
	 constant propagation starting
	    inferHandlers starting
	    inferHandlers finished in 2.660
	    fixed point starting
	    fixed point finished in 23.530
	 constant propagation finished in 49.990
	 num functions 4443
	 num local functions 54924
	 num primExps 99570
	 numPeeks = 50508118
	 average position in property list = 0.834
	 numPeeks = 4812750
	 average position in bucket = 1.012
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.770
	    checkScopes finished in 6.160
	 typeCheck finished in 18.450
	 useless starting
	    analyze starting
	    analyze finished in 44.260
	 useless finished in 79.690
	 num functions 4443
	 num local functions 52600
	 num primExps 90270
	 numPeeks = 54941930
	 average position in property list = 0.787
	 numPeeks = 5021188
	 average position in bucket = 1.020
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.690
	    checkScopes finished in 5.790
	 typeCheck finished in 18.360
	 remove-unused starting
	 remove-unused finished in 3.570
	 num functions 3948
	 num local functions 48766
	 num primExps 84917
	 numPeeks = 58294974
	 average position in property list = 0.744
	 numPeeks = 5084795
	 average position in bucket = 1.023
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.400
	    checkScopes finished in 5.310
	 typeCheck finished in 15.710
	 simplify-types starting
	    fixed point starting
	    fixed point finished in 0.860
	 simplify-types finished in 20.800
	 num functions 3948
	 num local functions 40618
	 num primExps 81743
	 numPeeks = 62214477
	 average position in property list = 0.714
	 numPeeks = 5151244
	 average position in bucket = 1.026
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.080
	    checkScopes finished in 4.480
	 typeCheck finished in 13.990
	 poly-equal starting
	 poly-equal finished in 0.660
	 num functions 3960
	 num local functions 41250
	 num primExps 82248
	 numPeeks = 63666937
	 average position in property list = 0.699
	 numPeeks = 5199559
	 average position in bucket = 1.029
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 1.990
	    checkScopes finished in 4.500
	 typeCheck finished in 14.160
	 contify starting
	 contify finished in 11.470
	 num functions 3876
	 num local functions 41231
	 num primExps 82137
	 numPeeks = 65828782
	 average position in property list = 0.678
	 numPeeks = 5247562
	 average position in bucket = 1.033
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.300
	    checkScopes finished in 5.720
	 typeCheck finished in 15.340
	 inline starting
	 inline finished in 32.790
	 num functions 1048
	 num local functions 65661
	 num primExps 137953
	 numPeeks = 69395265
	 average position in property list = 0.648
	 numPeeks = 5295462
	 average position in bucket = 1.036
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.440
	    checkScopes finished in 9.810
	 typeCheck finished in 27.040
	 remove-unused starting
	 remove-unused finished in 5.050
	 num functions 1048
	 num local functions 63260
	 num primExps 136851
	 numPeeks = 74134020
	 average position in property list = 0.609
	 numPeeks = 5410215
	 average position in bucket = 1.046
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.150
	    checkScopes finished in 7.060
	 typeCheck finished in 23.780
	 raise-to-jump starting
	    inferHandlers starting
	    inferHandlers finished in 3.120
	 raise-to-jump finished in 23.570
	 num functions 1048
	 num local functions 62994
	 num primExps 136691
	 numPeeks = 77731283
	 average position in property list = 0.585
	 numPeeks = 5523591
	 average position in bucket = 1.055
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.260
	    checkScopes finished in 7.070
	 typeCheck finished in 25.420
	 contify starting
	 contify finished in 18.640
	 num functions 1046
	 num local functions 62991
	 num primExps 136691
	 numPeeks = 81002488
	 average position in property list = 0.564
	 numPeeks = 5636888
	 average position in bucket = 1.063
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.260
	    checkScopes finished in 7.080
	 typeCheck finished in 23.900
	 introduce-loops starting
	 introduce-loops finished in 0.080
	 num functions 1046
	 num local functions 63022
	 num primExps 136691
	 numPeeks = 83220633
	 average position in property list = 0.551
	 numPeeks = 5750214
	 average position in bucket = 1.072
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.220
	    checkScopes finished in 7.090
	 typeCheck finished in 23.790
	 loop-invariant starting
	 loop-invariant finished in 21.270
	 num functions 1046
	 num local functions 60199
	 num primExps 129321
	 numPeeks = 86640770
	 average position in property list = 0.532
	 numPeeks = 5863509
	 average position in bucket = 1.080
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.030
	    checkScopes finished in 6.580
	 typeCheck finished in 22.250
	 flatten starting
	    analyze starting
	    analyze finished in 1.510
	 flatten finished in 34.700
	 num functions 1046
	 num local functions 60248
	 num primExps 85975
	 numPeeks = 90574660
	 average position in property list = 0.513
	 numPeeks = 5975481
	 average position in bucket = 1.087
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.230
	    checkScopes finished in 6.520
	 typeCheck finished in 20.350
	 redundant starting
	 redundant finished in 8.020
	 num functions 1046
	 num local functions 60248
	 num primExps 85975
	 numPeeks = 93081549
	 average position in property list = 0.502
	 numPeeks = 6062483
	 average position in bucket = 1.094
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.030
	    checkScopes finished in 6.260
	 typeCheck finished in 19.960
	 remove-unused starting
	 remove-unused finished in 5.610
	 num functions 1046
	 num local functions 59938
	 num primExps 84284
	 numPeeks = 97039716
	 average position in property list = 0.483
	 numPeeks = 6149498
	 average position in bucket = 1.100
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 2.940
	    checkScopes finished in 6.230
	 typeCheck finished in 19.910
      simplify finished in 856.600
   closure convert simplify finished in 856.600
   cps size is ~1 bytes
   numPeeks = 98810904
   average position in property list = 0.476
   numPeeks = 6234943
   average position in bucket = 1.107
   typeCheck starting
      checkScopes starting
	 inferHandlers starting
	 inferHandlers finished in 4.470
      checkScopes finished in 7.730
   typeCheck finished in 21.440
   backend starting
      compute representations starting
      compute representations finished in 0.180
      inferHandlers starting
      inferHandlers finished in 3.060
      chunkify starting
      chunkify finished in 4.280
      allocate registers starting
      allocate registers finished in 305.870
      reg size is ~1 bytes
      numPeeks = 186246457
      average position in property list = 1.098
      numPeeks = 6320388
      average position in bucket = 1.113
   backend finished in 342.440
    size is ~1 bytes
   numPeeks = 187967952
   average position in property list = 1.102
   numPeeks = 6337185
   average position in bucket = 1.113
   x86 code gen starting
      outputC starting
      outputC finished in 1.230
      outputAssembly starting