[pypy-svn] r22927 - in pypy/dist/pypy/jit: . test
pedronis at codespeak.net
pedronis at codespeak.net
Wed Feb 1 19:40:03 CET 2006
Author: pedronis
Date: Wed Feb 1 19:40:02 2006
New Revision: 22927
Modified:
pypy/dist/pypy/jit/hintmodel.py
pypy/dist/pypy/jit/test/test_hint_annotation.py
Log:
for now remove specialisation on fixed arguments, given the current propagation rules is a bit unclear how important it is.
The specialisation on concretes and on fixing of the results remain..
Modified: pypy/dist/pypy/jit/hintmodel.py
==============================================================================
--- pypy/dist/pypy/jit/hintmodel.py (original)
+++ pypy/dist/pypy/jit/hintmodel.py Wed Feb 1 19:40:02 2006
@@ -173,7 +173,6 @@
desc = bookkeeper.getdesc(fnobj.graph)
key = None
alt_name = None
- to_fix = []
if bookkeeper.myorigin().read_fixed():
key = 'fixed'
alt_name = fnobj.graph.name + '_HFixed'
@@ -184,22 +183,6 @@
if isinstance(arg_hs, SomeLLConcreteValue):
key.append('C')
specialize = True
- elif isinstance(arg_hs, SomeLLAbstractConstant):
- if arg_hs.origins:
- fixed = True
- for o in arg_hs.origins:
- if not o.read_fixed():
- fixed = False
- break
- if fixed:
- key.append('f')
- # fix the corresponding SomeLLAbstractConstant
- # in the input signature of the specialized callee
- to_fix.append(i)
- specialize = True
- continue
-
- key.append('x')
else:
key.append('x')
if specialize:
@@ -211,11 +194,6 @@
input_args_hs = list(args_hs)
graph = desc.specialize(input_args_hs, key=key, alt_name=alt_name)
- for i in to_fix:
- inp_arg_hs = input_args_hs[i]
- assert len(inp_arg_hs.origins) == 1
- inp_arg_hs.origins.keys()[0].set_fixed()
-
hs_res = bookkeeper.annotator.recursivecall(graph,
bookkeeper.position_key,
input_args_hs)
Modified: pypy/dist/pypy/jit/test/test_hint_annotation.py
==============================================================================
--- pypy/dist/pypy/jit/test/test_hint_annotation.py (original)
+++ pypy/dist/pypy/jit/test/test_hint_annotation.py Wed Feb 1 19:40:02 2006
@@ -26,7 +26,7 @@
{OriginFlags(): True})
for v in graph1.getargs()])
t = hannotator.translator
- #t.view()
+ t.view()
if annotator:
return hs, hannotator
else:
@@ -319,19 +319,12 @@
assert hs.concretetype == lltype.Signed
ll_add_graph = graphof(ha.base_translator, ll_add)
gdesc = ha.bookkeeper.getdesc(ll_add_graph)
- assert len(gdesc._cache) == 3
+ assert len(gdesc._cache) == 2
assert 'Cx' in gdesc._cache
- assert 'fx' in gdesc._cache
v1, v2 = gdesc._cache['Cx'].getargs()
assert isinstance(ha.binding(v1), SomeLLConcreteValue)
assert isinstance(ha.binding(v2), SomeLLAbstractConstant)
assert not ha.binding(v2).is_fixed()
- v1, v2 = gdesc._cache['fx'].getargs()
- assert isinstance(ha.binding(v1), SomeLLAbstractConstant)
- assert isinstance(ha.binding(v2), SomeLLAbstractConstant)
- assert ha.binding(v1).is_fixed()
- assert not ha.binding(v2).is_fixed()
-
def test_hannotate_tl():
from pypy.jit import tl
More information about the Pypy-commit
mailing list