RFR: 8262837: handle split_USE correctly

kuaiwei github.com+1981974+kuaiwei at openjdk.java.net
Tue Mar 2 09:31:54 UTC 2021


I look into reg_split.cpp and found a potential issue.
Function split_USE usually creates a new spill copy node, but in some cases it just connect def to use and no new node created. But in caller side, they will assume it will create a new node. The code is like:
++
maxlrg = split_USE(...)
if (!maxlrg) {
   return 0;
}
insidx++;  // Reset iterator to skip USE side split
So if no node is created, the iterator index is updated and the next instruction will be skipped.

The change is let split_USE return the new node count, so the caller can update its index and maxlrg.

-------------

Commit messages:
 - 8262837: handle split_USE correctly

Changes: https://git.openjdk.java.net/jdk/pull/2791/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2791&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8262837
  Stats: 46 lines in 2 files changed: 12 ins; 1 del; 33 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2791.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2791/head:pull/2791

PR: https://git.openjdk.java.net/jdk/pull/2791


More information about the hotspot-compiler-dev mailing list