On 03/05/2014 04:14 AM, Alex Bennée wrote: >> > + /* Hoist the loads of the most common arguments. */ >> > + TCGArg a0 = args[0]; >> > + TCGArg a1 = args[1]; >> > + TCGArg a2 = args[2]; >> > + int c2 = const_args[2]; >> > + > The code certainly looks a lot cleaner but I'm not sure what this gains > us. Surely the compiler should have done all this for us?
The compiler will only hoist stuff that's used on all following paths, not stuff that's used on most following paths. It also gains us variables in which we can manipulate the arguments before we pass them off. E.g. sign-extending 32-bit constants before entering the 64-bit path. r~