Omr: What are the semantics of ILOpCode::isTreeTop()?

Created on 22 Aug 2017  路  2Comments  路  Source: eclipse/omr

In the OMR compiler, isTreeTop is one of the several properties a node opcode can have. My understanding was that if isTreeTop() returns true, then the node must be anchored under a TR::TreeTop. However, as pointed out by #1553 and #1546, this does not seem to be the case.

So, what exactly does it mean for an opcode to have isTreeTop() return true?

Some related/follow-up questions:

  1. Should the ILValidator check for correct placement of TreeTop nodes?
  2. Should Tril implicitly anchor "non-TreeTop" nodes under a TreeTop node, unless it is already anchored or the user explicitly requests it to not be anchored?

@0xdaryl @mstoodle @vijaysun-omr @andrewcraik

question

Most helpful comment

@mgaudet's interpretation is right.

I believe isTreeTop must return true for any opcode that may appear at the top of the tree (node that TR::TreeTop points to). e.g. a store opcode would return true and while it is possible for a store opcode to be at the top of the tree, it is also possible for it to appear under a null check opcode.

All 2 comments

An alternative interpretation of the isTreeTop is all nodes that TR::TreeTops point to must have the property set.

I do think once we figure it out, probably do need to be using the validator to ensure it.

@mgaudet's interpretation is right.

I believe isTreeTop must return true for any opcode that may appear at the top of the tree (node that TR::TreeTop points to). e.g. a store opcode would return true and while it is possible for a store opcode to be at the top of the tree, it is also possible for it to appear under a null check opcode.

Was this page helpful?
0 / 5 - 0 ratings