[pypy-commit] pypy arm-backend-2: add get_all_loop_runs

bivab noreply at buildbot.pypy.org
Tue Aug 7 11:17:12 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r56625:eb1c7d3b91a5
Date: 2012-08-07 09:15 +0000
http://bitbucket.org/pypy/pypy/changeset/eb1c7d3b91a5/

Log:	add get_all_loop_runs

diff --git a/pypy/jit/backend/arm/runner.py b/pypy/jit/backend/arm/runner.py
old mode 100644
new mode 100755
--- a/pypy/jit/backend/arm/runner.py
+++ b/pypy/jit/backend/arm/runner.py
@@ -3,6 +3,7 @@
 from pypy.jit.backend.llsupport.llmodel import AbstractLLCPU
 from pypy.rpython.llinterp import LLInterpreter
 from pypy.rpython.lltypesystem import lltype, rffi, llmemory
+from pypy.rlib.jit_hooks import LOOP_RUN_CONTAINER
 from pypy.jit.backend.arm.arch import FORCE_INDEX_OFS
 
 
@@ -142,6 +143,16 @@
         # positions invalidated
         looptoken.compiled_loop_token.invalidate_positions = []
 
+    # should be combined with other ll backends
+    def get_all_loop_runs(self):
+        l = lltype.malloc(LOOP_RUN_CONTAINER,
+                          len(self.assembler.loop_run_counters))
+        for i, ll_s in enumerate(self.assembler.loop_run_counters):
+            l[i].type = ll_s.type
+            l[i].number = ll_s.number
+            l[i].counter = ll_s.i
+        return l
+
 class CPU_ARM(AbstractARMCPU):
     """ARM v7 uses softfp ABI, requires vfp"""
     pass


More information about the pypy-commit mailing list