Tom Rodriguez wrote:
-------------------------------------------------------------
I was staring at some code and noticed this:
427 B66: # B128 B67 <- B65 Freq: 0.999982
427 movl R9, narrowklass: precise klass java/io/DataOutputStream: 0x00007fa2db85f838:Constant:exact * # compressed klass ptr
42d decode_klass_not_null R9,R9
which generates this:
;; B66: # B128 B67 <- B65 Freq: 0.999982
0x000000010abd2a47: mov $0x6bca0,%r9d ; {metadata('java/io/DataOutputStream')}
0x000000010abd2a4d: movabs $0x800000000,%r12
0x000000010abd2a57: add %r12,%r9
0x000000010abd2a5a: xor %r12,%r12
which is a very expensive way to generate a 64 bit constant.
-------------------------------------------------------------
We should fold such code on x86 (SPARC is different story) into 64-bit constant load (loadConP) in final_graph_reshape phase.
-------------------------------------------------------------
I was staring at some code and noticed this:
427 B66: # B128 B67 <- B65 Freq: 0.999982
427 movl R9, narrowklass: precise klass java/io/DataOutputStream: 0x00007fa2db85f838:Constant:exact * # compressed klass ptr
42d decode_klass_not_null R9,R9
which generates this:
;; B66: # B128 B67 <- B65 Freq: 0.999982
0x000000010abd2a47: mov $0x6bca0,%r9d ; {metadata('java/io/DataOutputStream')}
0x000000010abd2a4d: movabs $0x800000000,%r12
0x000000010abd2a57: add %r12,%r9
0x000000010abd2a5a: xor %r12,%r12
which is a very expensive way to generate a 64 bit constant.
-------------------------------------------------------------
We should fold such code on x86 (SPARC is different story) into 64-bit constant load (loadConP) in final_graph_reshape phase.