All codegen in JSC runs through the MacroAssembler interface, which prevents 
any of the JITs from making machine specific optimisations (with the exception 
of those bits of code that are inherently architecture/os specific like ABI, 
etc).  In general this means that there are no architecture specific 
optimisations.

There are a couple of caveats to this statement:
  * The ARM backends have a much more complex linking pass that uses the most 
efficient instructions possible for any given branch, whereas the other 
architectures use exclusively long jumps.  It would be nice to have all the 
architectures use the more advanced linker pass if for no other reason than 
reduced code size (we generate a lot of 5 byte jumps in x86 code when a 2 byte 
jump would be sufficient)
  * In theory any particular backend _could_ do peephole optimisations. One 
could even just generate a more complex IR that it performed further 
optimisations on (an extreme example might be an LLVM IR backend for instance) 
although given the usage of most JS on the web I suspect such an approach would 
be too expensive to be worthwhile.

However I'm not sure just how much of a win architecture specific optimisations 
would give us at the moment, as I feel that our overall codegen quality is 
relatively poor (although the DFG does improve it substantially), and we can 
probably get a long way with more high level optimisation work.

--Oliver

On Jan 7, 2012, at 12:01 AM, wingoog moon wrote:

> HI!! I know that DFG JIT can do some general optimizatiopns such as 
> CSE,OSR,dead code eliminations.
> But all these optimizations are machine independent.
> So what machine dependent optimizations DFG JIT can do???(for inatance for 
> ARM platform) _______________________________________________
> squirrelfish-dev mailing list
> [email protected]
> http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

_______________________________________________
squirrelfish-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

Reply via email to