Node ids

Tom Rodriguez tom.rodriguez at oracle.com
Wed Mar 19 19:12:02 UTC 2014


It’s not stable for the entire compilation since the node id range may be compressed between tiers.  Within a phase it’s certainly stable though.

        suites.getHighTier().apply(graph, highTierContext);
        graph.maybeCompress();

        MidTierContext midTierContext = new MidTierContext(providers, assumptions, target, optimisticOpts, profilingInfo, speculationLog);
        suites.getMidTier().apply(graph, midTierContext);
        graph.maybeCompress();

        LowTierContext lowTierContext = new LowTierContext(providers, assumptions, target);
        suites.getLowTier().apply(graph, lowTierContext);
        graph.maybeCompress();

tom

On Mar 19, 2014, at 11:32 AM, Gilles Duboscq <duboscq at ssw.jku.at> wrote:

> Hello Miguel,
> 
> Yes, it's stable, Yes it's unique in a graph.
> As you already guessed, it's that way such that we can use bitsets for
> Set<Node> (NodeBitMap [1]) and a simple array for densely populated
> Map<Node, T> (NodeMap<T> [2])
> 
> [1] http://lafo.ssw.uni-linz.ac.at/javadoc/graalvm/all/com/oracle/graal/graph/NodeBitMap.html
> [2] http://lafo.ssw.uni-linz.ac.at/javadoc/graalvm/all/com/oracle/graal/graph/NodeMap.html
> 
> -Gilles
> 
> On Wed, Mar 19, 2014 at 7:16 PM, Garcia Gutierrez Miguel Alfredo
> <miguelalfredo.garcia at epfl.ch> wrote:
>> 
>> Sometimes a Set<Node> is needed just to track Node ids (ie, the elements are strongly reachable even if not in that set, or we don't care). In those cases, a dedicated IntSet data structure takes less memory. What about Node.id() ?
>> 
>> (1) is it stable (doesn't change after read for the first time)
>> 
>> (2) is it unique across (live and dead) nodes in a graph?
>> 
>> 
>> Miguel
>> 
>> --
>> Miguel Garcia
>> Swiss Federal Institute of Technology
>> EPFL - IC - LAMP1 - INR 328 - Station 14
>> CH-1015 Lausanne - Switzerland
>> http://lamp.epfl.ch/~magarcia/



More information about the graal-dev mailing list