[MLton] problem with strange Offset x86-codegen

Stephen Weeks MLton@mlton.org
Tue, 29 Jun 2004 10:32:17 -0700


After another round of tweaks last night (not the stuff to break main
into zones), we are making more progresson compiling Joe's large
program

MLton MLTONVERSION (built Mon Jun 28 19:30:25 2004 on eponym.sweeks.com)
   Compile SML starting
      pre codegen starting
	 backend starting
	    rssa size is 158,160,640 bytes
	 backend finished in 198.72 + 150.96 (43% GC)
	 machine size is 748,447,404 bytes
      pre codegen finished in 465.17 + 317.84 (41% GC)
      x86 code gen starting
	 outputAssembly starting
	    translateChunk raised
	 outputAssembly raised in 22924.12 + 6764.04 (23% GC)
      x86 code gen raised in 22924.12 + 6764.04 (23% GC)
   Compile SML raised in 23389.39 + 7081.88 (23% GC)
MLton raised in 23389.46 + 7081.88 (23% GC)
x86Translate.translateChunk::x86Translate.Chunk.toX86Chunk::x86Translate.Block.toX86Blocks::x86Translate.Statement.toX86Blocks::RP(1): Pointers (pt_1178)  = OP (Cast (0x1, Pointers (pt_1567)), 0)::x86Translate.Operand.toX86Operand::toX86Operand: strange Offset: base: $0x1

Now, the pre codegen is finishing in a mere 13 minutes and producing a
svelte 748M file, most of which is liveness data.  The codegen is
taking quite a while (!), so we still need to get the pass into to
break main into zones.  However, there is another problem, as seen
above. 

We've seen this before, but I can't remember if it's the backend's
responsibility to make sure that offsets of immediates don't happen or
if it's the codegen's responsibility to handle it.