Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/matcher.hpp @ 1575:3657cb01ffc5
6954029: Improve implicit null check generation with compressed oops
Summary: Hoist DecodeN instruction above null check
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Wed, 02 Jun 2010 09:49:32 -0700 |
parents | 2883969d09e7 |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1574:1eb493f33423 | 1575:3657cb01ffc5 |
---|---|
350 // Should the Matcher clone shifts on addressing modes, expecting them to | 350 // Should the Matcher clone shifts on addressing modes, expecting them to |
351 // be subsumed into complex addressing expressions or compute them into | 351 // be subsumed into complex addressing expressions or compute them into |
352 // registers? True for Intel but false for most RISCs | 352 // registers? True for Intel but false for most RISCs |
353 static const bool clone_shift_expressions; | 353 static const bool clone_shift_expressions; |
354 | 354 |
355 static bool narrow_oop_use_complex_address(); | |
356 | |
357 // Generate implicit null check for narrow oops if it can fold | |
358 // into address expression (x64). | |
359 // | |
360 // [R12 + narrow_oop_reg<<3 + offset] // fold into address expression | |
361 // NullCheck narrow_oop_reg | |
362 // | |
363 // When narrow oops can't fold into address expression (Sparc) and | |
364 // base is not null use decode_not_null and normal implicit null check. | |
365 // Note, decode_not_null node can be used here since it is referenced | |
366 // only on non null path but it requires special handling, see | |
367 // collect_null_checks(): | |
368 // | |
369 // decode_not_null narrow_oop_reg, oop_reg // 'shift' and 'add base' | |
370 // [oop_reg + offset] | |
371 // NullCheck oop_reg | |
372 // | |
373 // With Zero base and when narrow oops can not fold into address | |
374 // expression use normal implicit null check since only shift | |
375 // is needed to decode narrow oop. | |
376 // | |
377 // decode narrow_oop_reg, oop_reg // only 'shift' | |
378 // [oop_reg + offset] | |
379 // NullCheck oop_reg | |
380 // | |
381 inline static bool gen_narrow_oop_implicit_null_checks() { | |
382 return Universe::narrow_oop_use_implicit_null_checks() && | |
383 (narrow_oop_use_complex_address() || | |
384 Universe::narrow_oop_base() != NULL); | |
385 } | |
386 | |
355 // Is it better to copy float constants, or load them directly from memory? | 387 // Is it better to copy float constants, or load them directly from memory? |
356 // Intel can load a float constant from a direct address, requiring no | 388 // Intel can load a float constant from a direct address, requiring no |
357 // extra registers. Most RISCs will have to materialize an address into a | 389 // extra registers. Most RISCs will have to materialize an address into a |
358 // register first, so they may as well materialize the constant immediately. | 390 // register first, so they may as well materialize the constant immediately. |
359 static const bool rematerialize_float_constants; | 391 static const bool rematerialize_float_constants; |