1From: Chris Lattner [mailto:sabre@nondot.org] 2Sent: Wednesday, December 06, 2000 6:41 PM 3To: Vikram S. Adve 4Subject: Additional idea with respect to encoding 5 6Here's another idea with respect to keeping the common case instruction 7size 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 register 11number. 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, -1 18 19My guess is that most SSA references are to recent values (especially if 20they correspond to expressions like (x+y*z+p*q/ ...), so the negative 21numbers would tend to stay small, even at the end of the procedure (where 22the implicit register destination number could be quite large). Of course 23the negative sign is reduntant, so you would be storing small integers 24almost all of the time, and 5-6 bits worth of register number would be 25plenty for most cases... 26 27What do you think? 28 29-Chris 30 31