-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add helper functions for off heap technology changes #18303
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,91 @@ class OMR_EXTENSIBLE TransformUtil : public OMR::TransformUtilConnector | |
TR::Compilation *comp, | ||
TR::Node *object); | ||
|
||
static bool transformDirectLoad(TR::Compilation *, TR::Node *node); | ||
#if defined(J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION) | ||
/** | ||
* \brief | ||
* Generate IL to load dataAddr pointer from the array header | ||
* | ||
* \param comp | ||
* The compilation object | ||
* | ||
* \param arrayObject | ||
* The array object node | ||
* | ||
* \return | ||
* IL for loading dataAddr pointer | ||
*/ | ||
static TR::Node *generateDataAddrLoadTrees(TR::Compilation *comp, TR::Node *arrayObject); | ||
#endif /* J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION */ | ||
|
||
/** | ||
* \brief | ||
* Generate array element access IL for on and off heap contiguous arrays | ||
* | ||
* \param comp | ||
* The compilation object | ||
* | ||
* \param arrayNode | ||
* The array object node | ||
* | ||
* \param offsetNode | ||
* The offset node (in bytes) | ||
* | ||
* \return | ||
* IL to access array element at offset provided by offsetNode or | ||
* first array element if no offset node is provided | ||
*/ | ||
static TR::Node *generateArrayAddressTrees( | ||
TR::Compilation *comp, | ||
TR::Node *arrayNode, | ||
TR::Node *offsetNode = NULL); | ||
|
||
/** | ||
* \brief | ||
* Generate IL to access first array element | ||
* | ||
* \param comp | ||
* The compilation object | ||
* | ||
* \param arrayObject | ||
* The array object node | ||
* | ||
* \return | ||
* IL for accessing first array element | ||
*/ | ||
static TR::Node *generateArrayStartTrees(TR::Compilation *comp, TR::Node *arrayObject); | ||
|
||
/** | ||
* \brief | ||
* Generates IL to convert element index to offset in bytes using element | ||
* size (node or integer) | ||
* | ||
* \param comp | ||
* The compilation object | ||
* | ||
* \param indexNode | ||
* Array element index node | ||
* | ||
* \param elementSizeNode | ||
* Array element size tree (ex: const node containing element size) | ||
* | ||
* \param elementSize | ||
* Array element size | ||
* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we clarify what the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have updated the comment and variable name. Does it help or should I add more? |
||
* \param useShiftOpCode | ||
* Use left shift instead of multiplication | ||
* | ||
* \return | ||
* IL to convert array element index to offset in bytes | ||
*/ | ||
static TR::Node *generateArrayOffsetTrees( | ||
TR::Compilation *comp, | ||
TR::Node *indexNode, | ||
TR::Node *elementSizeNode = NULL, | ||
int32_t elementSize = 0, | ||
bool useShiftOpCode = false); | ||
|
||
static bool transformDirectLoad(TR::Compilation *comp, TR::Node *node); | ||
|
||
/** | ||
* \brief | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this node also need to be tagged as an internal pointer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offset node doesn't contain an address; just an offset value relative to the array object pointer. So we should be ok not marking it as an internal pointer.