Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [omr-dev] ILValue load() method

It is a rule, not an optimization: nodes can only be referenced directly within a single (extended) block. To communicate a value from one block to another requires storing to a temp and then loading in the other (extended) block.

A block is the standard basic block of compiler textbooks: a single entry and single normal exit flow (exception flows don't count).

An extended block is a linear sequence of blocks with no entry points other than the first one in the sequence. There can be "side" exits (at the end of any block in the sequence).

At the beginning of a compilation, there are only basic blocks. An optimization pass called basic block extension (done as part of block ordering) identifies blocks that can be combined into extended basic blocks and adds a flag to the second and subsequent blocks that you can see in JIT logs, e.g.:
        n17n      BBStart <block_4>(freq 302) (extension of previous block) (in loop 3)

The idea is that if you're evaluating a node X in an extended basic block, you can be sure that you have already evaluated every tree top from the beginning of the block until the tree that anchors X .

Mark Stoodley 8200 Warden Avenue
Senior Software Developer Markham, L6G 1C7
IBM Runtime Technologies Canada
Phone:+1-905-413-5831 
e-mail:mstoodle@xxxxxxxxxx 

We cannot solve our problems with the same thinking we used when we created them - Albert Einstein
 
 






From:        Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx>
To:        omr developer discussions <omr-dev@xxxxxxxxxxx>
Date:        2018/06/12 07:21 PM
Subject:        [omr-dev] ILValue load() method
Sent by:        omr-dev-bounces@xxxxxxxxxxx




Hi,

I notice that ILValue::load() method creates a temporary and stores
the value in the Block that computed the value, if the value is being
loaded in another block. I would like to understand why this is
necessary. Is it a rule that a value computed in one block cannot be
accessed directly in another block unless it is stored in the original
block? Is this an optimization of some sort?

Regards
Dibyendu
_______________________________________________
omr-dev mailing list
omr-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/omr-dev





Back to the top