dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (l


From: Aleksey Demakov
Subject: [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET Just In Time compiler (libjit) branch, master, updated. c25399bbbb26d19ffb467b09f9da7f952e22ef54
Date: Mon, 03 Aug 2009 17:33:00 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET Just In Time compiler (libjit)".

The branch, master has been updated
       via  c25399bbbb26d19ffb467b09f9da7f952e22ef54 (commit)
      from  a68a4acb80fd920020fc05ef20c7ed88101d3c1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/libjit.git/commit/?id=c25399bbbb26d19ffb467b09f9da7f952e22ef54

commit c25399bbbb26d19ffb467b09f9da7f952e22ef54
Author: Aleksey Demakov <address@hidden>
Date:   Tue Aug 4 00:30:00 2009 +0700

    avoid jump tables while cleaning branches

diff --git a/ChangeLog b/ChangeLog
index 0724190..7f06913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-04  Aleksey Demakov  <address@hidden>
+
+       * jit/jit-block.c (_jit_block_clean_cfg): avoid jump tables
+       while cleaning branches (thanks Fredrik Ehnbom).
+
 2009-06-10  Aleksey Demakov  <address@hidden>
 
        * jit/jit-rules-x86.ins (JIT_OP_BR_LFALSE): add opcode rule.
diff --git a/jit/jit-block.c b/jit/jit-block.c
index 43e9a67..82e2791 100644
--- a/jit/jit-block.c
+++ b/jit/jit-block.c
@@ -604,11 +604,16 @@ _jit_block_clean_cfg(jit_function_t func)
                }
                if(block->succs[0]->flags == _JIT_EDGE_BRANCH)
                {
+                       insn = _jit_block_get_last(block);
+                       if(insn->opcode == JIT_OP_JUMP_TABLE)
+                       {
+                               /* skip jump tables, handle only branches */
+                               continue;
+                       }
                        if(block->succs[0]->dst == block->next)
                        {
                                /* Replace useless branch with NOP */
                                changed = 1;
-                               insn = _jit_block_get_last(block);
                                insn->opcode = JIT_OP_NOP;
                                if(block->num_succs == 1)
                                {
@@ -633,7 +638,6 @@ _jit_block_clean_cfg(jit_function_t func)
                                   remove the fallthough edge while leaving the 
branch
                                   edge */
                                changed = 1;
-                               insn = _jit_block_get_last(block);
                                insn->opcode = JIT_OP_BR;
                                block->ends_in_dead = 1;
                                delete_edge(func, block->succs[1]);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    5 +++++
 jit/jit-block.c |    8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
DotGNU Portable.NET Just In Time compiler (libjit)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]