You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/04/14 13:25:15 UTC

[jira] Created: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

[drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
----------------------------------------------------------------------------------

                 Key: HARMONY-3652
                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Mikhail Fursov


I8Lowerer produces code that does not pass internal verification.
public class Test {
    
    public static void main(String[] args) throws Exception {
        System.out.println(new Hello().foo(10).buf);
    }

    String buf ="";
    public Test foo(long l) {
        boolean flag = false;
        if (l >= 20L) {
            flag = true;
        }
        if(flag || l >= 10L) {
            int k = (int)(l / 11L);
            writeDigits(k, flag);
        }
        return this;

    }

    void writeDigits(int i, boolean flag) {
        buf+=i;
    }
}


This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Commented: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Mikhail Fursov commented on HARMONY-3652:
-----------------------------------------

I found that the problem is not with I8Lowerer but with branch-translation(BTR) pass.
BTR relocates MOV instructions and can break CMP+Jcc pattern. 
I8Lowerer does not expect that there are other insts between CMP and Jcc and fails.

The patch fixes the problem in BTR and fixes some critical bugs found in ControlFlowGraph.cpp revealed by  testing of this patch.



> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Commented: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489679 ] 

Alexey Varlamov commented on HARMONY-3652:
------------------------------------------

Smth is wrong with the patch, it make DRLVM crashing on EHWA:

     [java]   0: Jitrino::DominatorTree::dominates(Jitrino::Node*, Jitrino::Node*) (??:-1)
     [java]   1: Jitrino::LoopTree::findLoopHeaders(Jitrino::StlVector<Jitrino::Node*, Jitrino::StlMMAllocator<Jitrino::Node*> >&) (??:-1)
     [java]   2: Jitrino::LoopTree::rebuild(bool) (??:-1)
     [java]   3: Jitrino::Ia32::IRManager::calculateLivenessInfo() (??:-1)
     [java]   4: Jitrino::Ia32::SessionAction::run() (??:-1)
     [java]   5: Jitrino::runPipeline(Jitrino::CompilationContext*) (??:-1)
     [java]   6: Jitrino::compileMethod(Jitrino::CompilationContext*) (??:-1)
     ...

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: btr.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Updated: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Mikhail Fursov updated HARMONY-3652:
------------------------------------

    Attachment: btr_2.diff

The problem was fixed in btr_2.diff patch

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: btr.diff, btr_2.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Updated: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Mikhail Fursov updated HARMONY-3652:
------------------------------------

    Attachment: btr.diff

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Attachments: btr.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Commented: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Mikhail Fursov commented on HARMONY-3652:
-----------------------------------------

Use -Xem:opt -XX:jit.arg.verify=2 option to reproduce

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Commented: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Mikhail Fursov commented on HARMONY-3652:
-----------------------------------------

Looks like my fix revealed another bug. Im going to check it and resubmit new patch.

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: btr.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Closed: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Alexey Varlamov closed HARMONY-3652.
------------------------------------

    Resolution: Fixed

Applied at r530744 + added reg.test

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: btr.diff, btr_2.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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


[jira] Assigned: (HARMONY-3652) [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification

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

Alexey Varlamov reassigned HARMONY-3652:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit][opt] I8Lowerer produces code that does not pass internal verification
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-3652
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3652
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: btr.diff
>
>
> I8Lowerer produces code that does not pass internal verification.
> public class Test {
>     
>     public static void main(String[] args) throws Exception {
>         System.out.println(new Hello().foo(10).buf);
>     }
>     String buf ="";
>     public Test foo(long l) {
>         boolean flag = false;
>         if (l >= 20L) {
>             flag = true;
>         }
>         if(flag || l >= 10L) {
>             int k = (int)(l / 11L);
>             writeDigits(k, flag);
>         }
>         return this;
>     }
>     void writeDigits(int i, boolean flag) {
>         buf+=i;
>     }
> }
> This bug is a blocker for jscience3.3  (http://jscience.org, JSR275)  test-suite.

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