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. 133e272f018ecc0a88cdfc202ea51c1aa16d1413
Date: Fri, 30 Oct 2009 17:18:07 +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  133e272f018ecc0a88cdfc202ea51c1aa16d1413 (commit)
      from  865ceafd016266a1f146e4b7f516edcadaffd45a (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=133e272f018ecc0a88cdfc202ea51c1aa16d1413

commit 133e272f018ecc0a88cdfc202ea51c1aa16d1413
Author: Aleksey Demakov <address@hidden>
Date:   Fri Oct 30 22:32:09 2009 +0600

    add jit_function_labels_equal() function

diff --git a/ChangeLog b/ChangeLog
index 9f78ab6..fa58561 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-10-30  Aleksey Demakov  <address@hidden>
 
+       * include/jit/jit-function.h, jit/jit-function.c
+       (jit_function_labels_equal): add function that checks if two labels
+       belong to the same basic block.
+
        * jit/jit-reg-alloc.h, jit/jit-reg-alloc.c
        (_jit_regs_clear_all_outgoing): add function.
        * jit/jit-compile.c (compile_block): use _jit_regs_clear_all_outgoing
diff --git a/include/jit/jit-function.h b/include/jit/jit-function.h
index 708b77d..e24271a 100644
--- a/include/jit/jit-function.h
+++ b/include/jit/jit-function.h
@@ -79,6 +79,7 @@ unsigned int jit_function_get_optimization_level
        (jit_function_t func) JIT_NOTHROW;
 unsigned int jit_function_get_max_optimization_level(void) JIT_NOTHROW;
 jit_label_t jit_function_reserve_label(jit_function_t func) JIT_NOTHROW;
+int jit_function_labels_equal(jit_function_t func, jit_label_t label, 
jit_label_t label2);
 
 #ifdef __cplusplus
 };
diff --git a/jit/jit-function.c b/jit/jit-function.c
index 8c92218..3cdc580 100644
--- a/jit/jit-function.c
+++ b/jit/jit-function.c
@@ -991,7 +991,7 @@ jit_function_get_max_optimization_level(void)
 
 /*@
  * @deftypefun {jit_label_t} jit_function_reserve_label (jit_function_t 
@var{func})
- * Allocate a new label for later use within the function @var{func}. Most
+ * Allocate a new label for later use within the function @var{func}.  Most
  * instructions that require a label could perform label allocation themselves.
  * A separate label allocation could be useful to fill a jump table with
  * identical entries.
@@ -1008,3 +1008,32 @@ jit_function_reserve_label(jit_function_t func)
 
        return (func->builder->next_label)++;
 }
+
+/*@
+ * @deftypefun {int} jit_function_labels_equal (jit_function_t @var{func}, 
jit_label_t @var{label}, jit_label_t @var{label2})
+ * Check if labels @var{label} and @var{label2} defined within the function
+ * @var{func} are equal that is belong to the same basic block.  Labels that
+ * are not associated with any block are never considered equal.
+ * @end deftypefun
address@hidden/
+int
+jit_function_labels_equal(jit_function_t func, jit_label_t label, jit_label_t 
label2)
+{
+       jit_block_t block, block2;
+
+       if(func && func->builder
+          && label != jit_label_undefined
+          && label2 != jit_label_undefined
+          && label < func->builder->max_label_info
+          && label2 < func->builder->max_label_info)
+       {
+               block = func->builder->label_info[label].block;
+               if(block)
+               {
+                       block2 = func->builder->label_info[label2].block;
+                       return block == block2;
+               }
+       }
+
+       return 0;
+}

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

Summary of changes:
 ChangeLog                  |    4 ++++
 include/jit/jit-function.h |    1 +
 jit/jit-function.c         |   31 ++++++++++++++++++++++++++++++-
 3 files changed, 35 insertions(+), 1 deletions(-)


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




reply via email to

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