31 lines · plain
1From: Chris Lattner [mailto:sabre@nondot.org]2Sent: Wednesday, December 06, 2000 6:41 PM3To: Vikram S. Adve4Subject: Additional idea with respect to encoding5 6Here's another idea with respect to keeping the common case instruction7size down (less than 32 bits ideally):8 9Instead of encoding an instruction to operate on two register numbers,10have it operate on two negative offsets based on the current register11number. Therefore, instead of using:12 13r57 = add r55, r56 (r57 is the implicit dest register, of course)14 15We could use:16 17r57 = add -2, -118 19My guess is that most SSA references are to recent values (especially if20they correspond to expressions like (x+y*z+p*q/ ...), so the negative21numbers would tend to stay small, even at the end of the procedure (where22the implicit register destination number could be quite large). Of course23the negative sign is reduntant, so you would be storing small integers24almost all of the time, and 5-6 bits worth of register number would be25plenty for most cases...26 27What do you think?28 29-Chris30 31