RFR: 8031639: make dependency management (mostly) ci independent

Christian Thalinger christian.thalinger at oracle.com
Mon Jan 13 22:42:28 PST 2014

I like the change.  What was the motivation for choosing:

positive: metadata, negative: object

If it would be the other way around you wouldn't have to negate the sort key:

+    // Used to sort values in ascending order of index() with metadata values preceding object values
+    int sort_key() const { return -_id; }


+  bool note_dep_seen(int dept, DepValue x) {
+    assert(dept < BitsPerInt, "oops");
+    // place metadata deps at even indexes, object deps at odd indexes
+    int x_id = x.is_metadata() ? x.index() * 2 : (x.index() * 2) + 1;

This means we’re using twice as much memory for seen dependencies but I guess it doesn’t matter much.

On a related note to the comment above if _id would be:

+        _id = (rec->find_index(metadata) << 1) | 1;

we would have unique, ready-to-use indexes.  Is there a reason why metadata and object values need to be grouped together?

On Jan 13, 2014, at 2:55 PM, Doug Simon <doug.simon at oracle.com> wrote:

> Hi all,
> I would like to request a review for a change to the Dependencies class such that it can be used to register assumptions based on either ci* values or raw values. The motivation is support compilers (such as Graal) that don't use the ci interface. 
> jbs:    https://bugs.openjdk.java.net/browse/JDK-8031639
> webrev: http://cr.openjdk.java.net/~dnsimon/JDK-8031639/
> -Doug

More information about the hotspot-compiler-dev mailing list