You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Evgueni Brevnov (JIRA)" <ji...@apache.org> on 2008/02/11 14:02:23 UTC

[jira] Created: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

[drlvm][jit][opt] On-stack allocation feature 
----------------------------------------------

                 Key: HARMONY-5486
                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
             Project: Harmony
          Issue Type: Improvement
          Components: DRLVM
         Environment: All
            Reporter: Evgueni Brevnov
         Attachments: alloca.patch

Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the suck but managed heap.

Thanks
Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Egor Pasko closed HARMONY-5486.
-------------------------------

    Resolution: Won't Fix
      Assignee: Egor Pasko  (was: Mikhail Fursov)

reasons explained above, thanks for great work

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>            Assignee: Egor Pasko
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgueni Brevnov updated HARMONY-5486:
-------------------------------------

    Attachment: alloca.patch

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the suck but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567635#action_12567635 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

Evgueni, please, make formatting changes as a separate patch. It is not easy to read the changes, especially in Opcode.cpp

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567657#action_12567657 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

any microbenchmark?

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567940#action_12567940 ] 

Evgueni Brevnov commented on HARMONY-5486:
------------------------------------------

It's too early to talk about benchmarks because current patch doesn't introduce any new optimization. It just indroduces new instruction which can be used in other optimizations to allocate space on the stack.

Evgueni

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568006#action_12568006 ] 

Evgueni Brevnov commented on HARMONY-5486:
------------------------------------------

For HIR users it's convinient  to have and operate one new instruction than a new operand kind. Also less efforts required to integrate this solution into current Jitrino framework. Makes sense?

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568038#action_12568038 ] 

Evgueni Brevnov commented on HARMONY-5486:
------------------------------------------

LEA - is load effective address.

We don't need tau cause it doesn't depend on any other instruction.

It would be wondefull if we could move any instruction out of the loops. Unfortunately, it's not always possible. We need it in HLO since it''s planned to use in HLO optimizations in future.

I don't think that alloca is not informative. You can try ask google about it :-)

Evgueni



> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568047#action_12568047 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

OK, I should agree, alloca is descriptive. Also I should agree that moving LEA out of the loops is useful, now I understand, greater thanks!

will you separate formatting? :)

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680773#action_12680773 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

I propose to close this issue because:
1. it is one year old without any means of further development since
2. the patch provides some facilities for other optimizations that are currently NOT under development
3. there is no "design document" about this feature anywhere freely available

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>            Assignee: Mikhail Fursov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgueni Brevnov updated HARMONY-5486:
-------------------------------------

    Description: 
Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.

Thanks
Evgueni

  was:
Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the suck but managed heap.

Thanks
Evgueni


> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov reassigned HARMONY-5486:
---------------------------------------

    Assignee: Mikhail Fursov

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>            Assignee: Mikhail Fursov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568029#action_12568029 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

what is LEA? :)

BTW, if we move instructions, we need tau operands

hmm, do not understand the benefit of moving this actual instruction out of loops, other instructions can be moved with the same benefits :) And I guess you have lots of ideas how to optimize it in High-Level, because otherwise we do not need it in HLO :)

one more note: "alloca" is not a descriptive mnemonic, could you, please, rename it to something like "stackalloc"?

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568004#action_12568004 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

OK, I see, thanks, Evgueni.

And why is it a special instruction? Why don't we just mark operands as on-stack?


> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568019#action_12568019 ] 

Evgueni Brevnov commented on HARMONY-5486:
------------------------------------------

New HIR instruction (alloca) is actually translated into LEA instruction. So no special tricks here. I think it's better to teach HLO optimizations how to optimize it rather than deal with non optimal code. For eaxample it's allowed to move it out from loops.

Each approach has its pros & cons. I don't see strong reasons against having new instruction. Though it would be interesting to see alternative implementation :-)

Thanks
Evgueni

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568086#action_12568086 ] 

Evgueni Brevnov commented on HARMONY-5486:
------------------------------------------

Egor,

I use GUI tool for patch reviewing which allows to ignore unimportant differencies like formating. Do you know how I can prepare a patch ignoring such differencies? Somehow "svn diff  --diff-cmd diff.exe  -x  -w  -x  -B" doesn't work for me.

Evgueni

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5486) [drlvm][jit][opt] On-stack allocation feature

Posted by "Egor Pasko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568007#action_12568007 ] 

Egor Pasko commented on HARMONY-5486:
-------------------------------------

Hm, I dunno, did not think about it actually. I guess this is a tradeoff: from one hand instruction seems like easier to deal with than any operand (I do not know where we should deal with it actually), but on the other hand supporting new instructions in all optimizations is rather not beautiful, one needs to update all switch(Opcode).

Do you have a small sketch of the what's going to be done with this instruction? What optpasses are likely to be involved? I would be very happy to read that and add some tricky details to my poor knowledge of the subject.

> [drlvm][jit][opt] On-stack allocation feature 
> ----------------------------------------------
>
>                 Key: HARMONY-5486
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5486
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Evgueni Brevnov
>         Attachments: alloca.patch
>
>
> Here is a new feature which allows to allocate space on the stack. It can be used to implement new optimization. Non-escaped objects can be allocated on the stack but managed heap.
> Thanks
> Evgueni

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.