You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by Apache Wiki <wi...@apache.org> on 2008/05/13 11:06:43 UTC

[Harmony Wiki] Update of "Jitrino OPT/hlo api magic" by Mikhail Fursov

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification.

The following page has been changed by Mikhail Fursov:
http://wiki.apache.org/harmony/Jitrino_OPT/hlo_api_magic

------------------------------------------------------------------------------
- The pass replaces known Java API method calls with predefined algorithms written with HIR.
+ ''' 'hlo_api_magics' ''' pass replaces known Java API method calls with predefined algorithms written with HIR.
+ [[BR]][[BR]]
+ The optimization replaces calls to known API or VM-kernel methods with an optimized set of HIR instructions.
+ [[BR]]
+ Notes: 
+ [[BR]]
+ If rewriting of a method requires low-level details about active platform instruction sets use [:Jitirno_OPT/api_magic: LIR-based api_magic pass] 
+ [[BR]]
  
- If a call is being replaced with just a few instructions it should be done in the origin api_magic pass in codegenerator. For the cases when a call should be replaced with a sub-graph wit ha lot of different instructions including branches the replacement must be done in HLO path due to at least two reasons:
-  * It is much easier to create and insert sub-graph into HIR rather than into LIR;
-  * After insertion new instructions can be optimized by other high-level optimizations. (The effect is the same as for inlining)
+ Example of Java API methods that can be replaced with HIR templates:
+ {{{
+     java/lang/String.compareTo
+     java/lang/String.indexOf
+     java/lang/System.arraycopy
+ ...
+ }}}