Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Things that are hard about compiling to x86

Name: Anonymous 2015-07-30 0:16

It is really hard to compile arithmetic to x86 assembly because:

* (A) add x,y requires at least one of x,y to be a register.
* (B) mul x is predefined to use eax and edx registers.

These make it hard when you're trying to do register allocation because

* (A) What if you spilled x and now need to spill y? You cannot spill both
* (B) This messes with register coloring, you want to precolor the graph but the polytime algorithms (for chordal graphs, which SSA has) break if you precolor.

I'm really stuck, any advice welcome

Name: Anonymous 2015-08-05 14:12

>>41
thank you for this interesting input.

It really feels like there is just no simple satisfying way to do register allocation.

I don't mind heuristics, I get that we need them because everything is NP otherwise. I just hate iterated spilling.. it's too hard to justify its' termination and correctness. the beautiful algorithms don't apply to the general case (like x86's weirrdness).

I'ts reoaelly frustrating because i just want to get i tdone but I can't at all settle on a design.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List