RFR: 8265711: C1: Intrinsify Class.getModifier method [v2]
Yi Yang
yyang at openjdk.java.net
Wed Apr 28 06:37:55 UTC 2021
On Tue, 27 Apr 2021 13:23:31 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Why are you reloading the klass here?
Typo. I forget removing it.
> Also, as @rwestrel explained in the RFR for 8211231, we need to be really careful when emitting branches in C1's LIR.
> The problem is that there's control flow here that's invisible to
the register allocator. The register allocator only knows about control
flow that connects basic blocks. The control flow here is within a
block. So as far as the register allocator is concerned the code above
is a linear sequence of instructions all of which are all executed
Ok, I see. But from the compiled code, it behaves well:
B1 [0, 0] sux: B0
__id_Instruction___________________________________________
0 label [label:0x00007f0c10025f60]
2 std_entry
B0 std [0, 4] preds: B1
__id_Instruction___________________________________________
8 label [label:0x00007f0c100253c0]
10 move [Base:[rsi|L] Disp: 16|] [rax|M] [bci:1]
12 cmp [NE] [rax|M] [metadata:0x0000000000000000|M]
14 branch [NE] [label:0x00007f0c10028d78]
16 move [int:1041|I] [rsi|I]
18 branch [AL] [label:0x00007f0c10028e18]
20 label [label:0x00007f0c10028d78]
22 move [Base:[rax|M] Disp: 168|I] [rsi|I]
24 label [label:0x00007f0c10028e18]
26 move [rsi|I] [rax|I]
28 return [rax|I]
__bci__use__tid____instr____________________________________
. 0 0 4 B1 [0, 0] -> B0 sux: B0
0 label [label:0x00007f0c10025f60]
Memory range [0x00007f0ca06a9120..0x00007f0ca06a9120] not readable 2 std_entry
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a9120: mov %eax,-0x16000(%rsp)
0x00007f0ca06a9127: push %rbp
0x00007f0ca06a9128: sub $0x30,%rsp
--------------------------------------------------------------------------------
__bci__use__tid____instr____________________________________
. 0 0 0 B0 (SV) [0, 4] dom B1 pred: B1
8 label [label:0x00007f0c100253c0]
Memory range [0x00007f0ca06a912c..0x00007f0ca06a912c] not readable 10 move [Base:[rsi|L] Disp: 16|] [rax|M] [bci:1]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a912c: mov 0x10(%rsi),%rax
--------------------------------------------------------------------------------
12 cmp [NE] [rax|M] [metadata:0x0000000000000000|M]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a9130: cmp $0x0,%rax
--------------------------------------------------------------------------------
14 branch [NE] [label:0x00007f0c10028d78]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a9134: jne 0x00007f0ca06a913a
--------------------------------------------------------------------------------
16 move [int:1041|I] [rsi|I]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a913a: mov $0x411,%esi
--------------------------------------------------------------------------------
18 branch [AL] [label:0x00007f0c10028e18]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a913f: jmpq 0x00007f0ca06a9144
--------------------------------------------------------------------------------
20 label [label:0x00007f0c10028d78]
Memory range [0x00007f0ca06a9144..0x00007f0ca06a9144] not readable 22 move [Base:[rax|M] Disp: 168|I] [rsi|I]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a9144: mov 0xa8(%rax),%esi
--------------------------------------------------------------------------------
24 label [label:0x00007f0c10028e18]
Memory range [0x00007f0ca06a914a..0x00007f0ca06a914a] not readable 26 move [rsi|I] [rax|I]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a914a: mov %rsi,%rax
--------------------------------------------------------------------------------
28 return [rax|I]
--------------------------------------------------------------------------------
;; block B1 [0, 0]
0x00007f0ca06a914d: add $0x30,%rsp
0x00007f0ca06a9151: pop %rbp
0x00007f0ca06a9152: cmp 0x118(%r15),%rsp
;; block B0 [0, 4]
0x00007f0ca06a9159: ja 0x00007f0ca06a915f
0x00007f0ca06a915f: retq
--------------------------------------------------------------------------------
Also tests under compiler and jdk are passed with slowdebug mode.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3616
More information about the hotspot-compiler-dev
mailing list