PageRenderTime 155ms CodeModel.GetById 3ms RepoModel.GetById 1ms app.codeStats 0ms

/rpython/rlib/jit.py

https://bitbucket.org/pypy/pypy/
Python | 1264 lines | 1259 code | 5 blank | 0 comment | 17 complexity | 7bc75169fe9441b3aa48853791bafa96 MD5 | raw file
Possible License(s): AGPL-3.0, BSD-3-Clause, Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. import sys
  2. import py
  3. from rpython.rlib.nonconst import NonConstant
  4. from rpython.rlib.objectmodel import CDefinedIntSymbolic, keepalive_until_here, specialize
  5. from rpython.rlib.unroll import unrolling_iterable
  6. from rpython.rtyper.extregistry import ExtRegistryEntry
  7. from rpython.tool.sourcetools import rpython_wrapper
  8. DEBUG_ELIDABLE_FUNCTIONS = False
  9. def elidable(func):
  10. """ Decorate a function as "trace-elidable". Usually this means simply that
  11. the function is constant-foldable, i.e. is pure and has no side-effects.
  12. This also has the effect that the inside of the function will never be
  13. traced.
  14. In some situations it is ok to use this decorator if the function *has*
  15. side effects, as long as these side-effects are idempotent. A typical
  16. example for this would be a cache.
  17. To be totally precise:
  18. (1) the result of the call should not change if the arguments are
  19. the same (same numbers or same pointers)
  20. (2) it's fine to remove the call completely if we can guess the result
  21. according to rule 1
  22. (3) the function call can be moved around by optimizer,
  23. but only so it'll be called earlier and not later.
  24. Most importantly it doesn't mean that an elidable function has no observable
  25. side effect, but those side effects are idempotent (ie caching).
  26. If a particular call to this function ends up raising an exception, then it
  27. is handled like a normal function call (this decorator is ignored).
  28. Note also that this optimisation will only take effect if the arguments
  29. to the function are proven constant. By this we mean each argument
  30. is either:
  31. 1) a constant from the RPython source code (e.g. "x = 2")
  32. 2) easily shown to be constant by the tracer
  33. 3) a promoted variable (see @jit.promote)
  34. Examples of condition 2:
  35. * i1 = int_eq(i0, 0), guard_true(i1)
  36. * i1 = getfield_pc_pure(<constant>, "immutable_field")
  37. In both cases, the tracer will deduce that i1 is constant.
  38. Failing the above conditions, the function is not traced into (as if the
  39. function were decorated with @jit.dont_look_inside). Generally speaking,
  40. it is a bad idea to liberally sprinkle @jit.elidable without a concrete
  41. need.
  42. """
  43. if DEBUG_ELIDABLE_FUNCTIONS:
  44. cache = {}
  45. oldfunc = func
  46. def func(*args):
  47. result = oldfunc(*args) # if it raises, no caching
  48. try:
  49. oldresult = cache.setdefault(args, result)
  50. except TypeError:
  51. pass # unhashable args
  52. else:
  53. assert oldresult == result
  54. return result
  55. if getattr(func, '_jit_unroll_safe_', False):
  56. raise TypeError("it does not make sense for %s to be both elidable and unroll_safe" % func)
  57. func._elidable_function_ = True
  58. return func
  59. def purefunction(*args, **kwargs):
  60. import warnings
  61. warnings.warn("purefunction is deprecated, use elidable instead", DeprecationWarning)
  62. return elidable(*args, **kwargs)
  63. def hint(x, **kwds):
  64. """ Hint for the JIT
  65. possible arguments are:
  66. * promote - promote the argument from a variable into a constant
  67. * promote_string - same, but promote string by *value*
  68. * access_directly - directly access a virtualizable, as a structure
  69. and don't treat it as a virtualizable
  70. * fresh_virtualizable - means that virtualizable was just allocated.
  71. Useful in say Frame.__init__ when we do want
  72. to store things directly on it. Has to come with
  73. access_directly=True
  74. * force_virtualizable - a performance hint to force the virtualizable early
  75. (useful e.g. for python generators that are going
  76. to be read later anyway)
  77. """
  78. return x
  79. @specialize.argtype(0)
  80. def promote(x):
  81. """
  82. Promotes a variable in a trace to a constant.
  83. When a variable is promoted, a guard is inserted that assumes the value
  84. of the variable is constant. In other words, the value of the variable
  85. is checked to be the same as it was at trace collection time. Once the
  86. variable is assumed constant, more aggressive constant folding may be
  87. possible.
  88. If however, the guard fails frequently, a bridge will be generated
  89. this time assuming the constancy of the variable under its new value.
  90. This optimisation should be used carefully, as in extreme cases, where
  91. the promoted variable is not very constant at all, code explosion can
  92. occur. In turn this leads to poor performance.
  93. Overpromotion is characterised by a cascade of bridges branching from
  94. very similar guard_value opcodes, each guarding the same variable under
  95. a different value.
  96. Note that promoting a string with @jit.promote will promote by pointer.
  97. To promote a string by value, see @jit.promote_string.
  98. """
  99. return hint(x, promote=True)
  100. def promote_string(x):
  101. return hint(x, promote_string=True)
  102. def dont_look_inside(func):
  103. """ Make sure the JIT does not trace inside decorated function
  104. (it becomes a call instead)
  105. """
  106. if getattr(func, '_jit_unroll_safe_', False):
  107. raise TypeError("it does not make sense for %s to be both dont_look_inside and unroll_safe" % func)
  108. func._jit_look_inside_ = False
  109. return func
  110. def look_inside(func):
  111. """ Make sure the JIT traces inside decorated function, even
  112. if the rest of the module is not visible to the JIT
  113. """
  114. import warnings
  115. warnings.warn("look_inside is deprecated", DeprecationWarning)
  116. func._jit_look_inside_ = True
  117. return func
  118. def unroll_safe(func):
  119. """ JIT can safely unroll loops in this function and this will
  120. not lead to code explosion
  121. """
  122. if getattr(func, '_elidable_function_', False):
  123. raise TypeError("it does not make sense for %s to be both elidable and unroll_safe" % func)
  124. if not getattr(func, '_jit_look_inside_', True):
  125. raise TypeError("it does not make sense for %s to be both elidable and dont_look_inside" % func)
  126. func._jit_unroll_safe_ = True
  127. return func
  128. def loop_invariant(func):
  129. """ Describes a function with no argument that returns an object that
  130. is always the same in a loop.
  131. Use it only if you know what you're doing.
  132. """
  133. dont_look_inside(func)
  134. func._jit_loop_invariant_ = True
  135. return func
  136. def _get_args(func):
  137. import inspect
  138. args, varargs, varkw, defaults = inspect.getargspec(func)
  139. assert varargs is None and varkw is None
  140. assert not defaults
  141. return args
  142. def elidable_promote(promote_args='all'):
  143. """ A decorator that promotes all arguments and then calls the supplied
  144. function
  145. """
  146. def decorator(func):
  147. elidable(func)
  148. args = _get_args(func)
  149. argstring = ", ".join(args)
  150. code = ["def f(%s):\n" % (argstring, )]
  151. if promote_args != 'all':
  152. args = [args[int(i)] for i in promote_args.split(",")]
  153. for arg in args:
  154. code.append( #use both hints, and let jtransform pick the right one
  155. " %s = hint(%s, promote=True, promote_string=True)\n" %
  156. (arg, arg))
  157. code.append(" return _orig_func_unlikely_name(%s)\n" % (argstring, ))
  158. d = {"_orig_func_unlikely_name": func, "hint": hint}
  159. exec py.code.Source("\n".join(code)).compile() in d
  160. result = d["f"]
  161. result.func_name = func.func_name + "_promote"
  162. return result
  163. return decorator
  164. def purefunction_promote(*args, **kwargs):
  165. import warnings
  166. warnings.warn("purefunction_promote is deprecated, use elidable_promote instead", DeprecationWarning)
  167. return elidable_promote(*args, **kwargs)
  168. def look_inside_iff(predicate):
  169. """
  170. look inside (including unrolling loops) the target function, if and only if
  171. predicate(*args) returns True
  172. """
  173. def inner(func):
  174. func = unroll_safe(func)
  175. # When we return the new function, it might be specialized in some
  176. # way. We "propogate" this specialization by using
  177. # specialize:call_location on relevant functions.
  178. for thing in [func, predicate]:
  179. thing._annspecialcase_ = "specialize:call_location"
  180. args = _get_args(func)
  181. predicateargs = _get_args(predicate)
  182. assert len(args) == len(predicateargs), "%s and predicate %s need the same numbers of arguments" % (func, predicate)
  183. d = {
  184. "dont_look_inside": dont_look_inside,
  185. "predicate": predicate,
  186. "func": func,
  187. "we_are_jitted": we_are_jitted,
  188. }
  189. exec py.code.Source("""
  190. @dont_look_inside
  191. def trampoline(%(arguments)s):
  192. return func(%(arguments)s)
  193. if hasattr(func, "oopspec"):
  194. trampoline.oopspec = func.oopspec
  195. del func.oopspec
  196. trampoline.__name__ = func.__name__ + "_trampoline"
  197. trampoline._annspecialcase_ = "specialize:call_location"
  198. def f(%(arguments)s):
  199. if not we_are_jitted() or predicate(%(arguments)s):
  200. return func(%(arguments)s)
  201. else:
  202. return trampoline(%(arguments)s)
  203. f.__name__ = func.__name__ + "_look_inside_iff"
  204. """ % {"arguments": ", ".join(args)}).compile() in d
  205. return d["f"]
  206. return inner
  207. def oopspec(spec):
  208. def decorator(func):
  209. func.oopspec = spec
  210. return func
  211. return decorator
  212. def not_in_trace(func):
  213. """A decorator for a function with no return value. It makes the
  214. function call disappear from the jit traces. It is still called in
  215. interpreted mode, and by the jit tracing and blackholing, but not
  216. by the final assembler."""
  217. func.oopspec = "jit.not_in_trace()" # note that 'func' may take arguments
  218. return func
  219. @oopspec("jit.isconstant(value)")
  220. def isconstant(value):
  221. """
  222. While tracing, returns whether or not the value is currently known to be
  223. constant. This is not perfect, values can become constant later. Mostly for
  224. use with @look_inside_iff.
  225. This is for advanced usage only.
  226. """
  227. return NonConstant(False)
  228. isconstant._annspecialcase_ = "specialize:call_location"
  229. @oopspec("jit.isvirtual(value)")
  230. def isvirtual(value):
  231. """
  232. Returns if this value is virtual, while tracing, it's relatively
  233. conservative and will miss some cases.
  234. This is for advanced usage only.
  235. """
  236. return NonConstant(False)
  237. isvirtual._annspecialcase_ = "specialize:call_location"
  238. @specialize.call_location()
  239. def loop_unrolling_heuristic(lst, size, cutoff=2):
  240. """ In which cases iterating over items of lst can be unrolled
  241. """
  242. return size == 0 or isvirtual(lst) or (isconstant(size) and size <= cutoff)
  243. class Entry(ExtRegistryEntry):
  244. _about_ = hint
  245. def compute_result_annotation(self, s_x, **kwds_s):
  246. from rpython.annotator import model as annmodel
  247. s_x = annmodel.not_const(s_x)
  248. access_directly = 's_access_directly' in kwds_s
  249. fresh_virtualizable = 's_fresh_virtualizable' in kwds_s
  250. if access_directly or fresh_virtualizable:
  251. assert access_directly, "lone fresh_virtualizable hint"
  252. if isinstance(s_x, annmodel.SomeInstance):
  253. from rpython.flowspace.model import Constant
  254. classdesc = s_x.classdef.classdesc
  255. virtualizable = classdesc.get_param('_virtualizable_')
  256. if virtualizable is not None:
  257. flags = s_x.flags.copy()
  258. flags['access_directly'] = True
  259. if fresh_virtualizable:
  260. flags['fresh_virtualizable'] = True
  261. s_x = annmodel.SomeInstance(s_x.classdef,
  262. s_x.can_be_None,
  263. flags)
  264. return s_x
  265. def specialize_call(self, hop, **kwds_i):
  266. from rpython.rtyper.lltypesystem import lltype
  267. hints = {}
  268. for key, index in kwds_i.items():
  269. s_value = hop.args_s[index]
  270. if not s_value.is_constant():
  271. from rpython.rtyper.error import TyperError
  272. raise TyperError("hint %r is not constant" % (key,))
  273. assert key.startswith('i_')
  274. hints[key[2:]] = s_value.const
  275. v = hop.inputarg(hop.args_r[0], arg=0)
  276. c_hint = hop.inputconst(lltype.Void, hints)
  277. hop.exception_cannot_occur()
  278. return hop.genop('hint', [v, c_hint], resulttype=v.concretetype)
  279. def we_are_jitted():
  280. """ Considered as true during tracing and blackholing,
  281. so its consquences are reflected into jitted code """
  282. return False
  283. _we_are_jitted = CDefinedIntSymbolic('0 /* we are not jitted here */',
  284. default=0)
  285. def _get_virtualizable_token(frame):
  286. """ An obscure API to get vable token.
  287. Used by _vmprof
  288. """
  289. from rpython.rtyper.lltypesystem import lltype, llmemory
  290. return lltype.nullptr(llmemory.GCREF.TO)
  291. class GetVirtualizableTokenEntry(ExtRegistryEntry):
  292. _about_ = _get_virtualizable_token
  293. def compute_result_annotation(self, s_arg):
  294. from rpython.rtyper.llannotation import SomePtr
  295. from rpython.rtyper.lltypesystem import llmemory
  296. return SomePtr(llmemory.GCREF)
  297. def specialize_call(self, hop):
  298. from rpython.rtyper.lltypesystem import lltype, llmemory
  299. hop.exception_cannot_occur()
  300. T = hop.args_r[0].lowleveltype.TO
  301. v = hop.inputarg(hop.args_r[0], arg=0)
  302. while not hasattr(T, 'vable_token'):
  303. if not hasattr(T, 'super'):
  304. # we're not really in a jitted build
  305. return hop.inputconst(llmemory.GCREF,
  306. lltype.nullptr(llmemory.GCREF.TO))
  307. T = T.super
  308. v = hop.genop('cast_pointer', [v], resulttype=lltype.Ptr(T))
  309. c_vable_token = hop.inputconst(lltype.Void, 'vable_token')
  310. return hop.genop('getfield', [v, c_vable_token],
  311. resulttype=llmemory.GCREF)
  312. class Entry(ExtRegistryEntry):
  313. _about_ = we_are_jitted
  314. def compute_result_annotation(self):
  315. from rpython.annotator import model as annmodel
  316. return annmodel.SomeInteger(nonneg=True)
  317. def specialize_call(self, hop):
  318. from rpython.rtyper.lltypesystem import lltype
  319. hop.exception_cannot_occur()
  320. return hop.inputconst(lltype.Signed, _we_are_jitted)
  321. def current_trace_length():
  322. """During JIT tracing, returns the current trace length (as a constant).
  323. If not tracing, returns -1."""
  324. if NonConstant(False):
  325. return 73
  326. return -1
  327. current_trace_length.oopspec = 'jit.current_trace_length()'
  328. def jit_debug(string, arg1=-sys.maxint-1, arg2=-sys.maxint-1,
  329. arg3=-sys.maxint-1, arg4=-sys.maxint-1):
  330. """When JITted, cause an extra operation JIT_DEBUG to appear in
  331. the graphs. Should not be left after debugging."""
  332. keepalive_until_here(string) # otherwise the whole function call is removed
  333. jit_debug.oopspec = 'jit.debug(string, arg1, arg2, arg3, arg4)'
  334. def assert_green(value):
  335. """Very strong assert: checks that 'value' is a green
  336. (a JIT compile-time constant)."""
  337. keepalive_until_here(value)
  338. assert_green._annspecialcase_ = 'specialize:argtype(0)'
  339. assert_green.oopspec = 'jit.assert_green(value)'
  340. class AssertGreenFailed(Exception):
  341. pass
  342. def jit_callback(name):
  343. """Use as a decorator for C callback functions, to insert a
  344. jitdriver.jit_merge_point() at the start. Only for callbacks
  345. that typically invoke more app-level Python code.
  346. """
  347. def decorate(func):
  348. from rpython.tool.sourcetools import compile2
  349. #
  350. def get_printable_location():
  351. return name
  352. jitdriver = JitDriver(get_printable_location=get_printable_location,
  353. greens=[], reds='auto', name=name)
  354. #
  355. args = ','.join(['a%d' % i for i in range(func.func_code.co_argcount)])
  356. source = """def callback_with_jitdriver(%(args)s):
  357. jitdriver.jit_merge_point()
  358. return real_callback(%(args)s)""" % locals()
  359. miniglobals = {
  360. 'jitdriver': jitdriver,
  361. 'real_callback': func,
  362. }
  363. exec compile2(source) in miniglobals
  364. return miniglobals['callback_with_jitdriver']
  365. return decorate
  366. # ____________________________________________________________
  367. # VRefs
  368. @specialize.argtype(0)
  369. def virtual_ref(x):
  370. """Creates a 'vref' object that contains a reference to 'x'. Calls
  371. to virtual_ref/virtual_ref_finish must be properly nested. The idea
  372. is that the object 'x' is supposed to be JITted as a virtual between
  373. the calls to virtual_ref and virtual_ref_finish, but the 'vref'
  374. object can escape at any point in time. If at runtime it is
  375. dereferenced (by the call syntax 'vref()'), it returns 'x', which is
  376. then forced."""
  377. return DirectJitVRef(x)
  378. virtual_ref.oopspec = 'virtual_ref(x)'
  379. @specialize.argtype(1)
  380. def virtual_ref_finish(vref, x):
  381. """See docstring in virtual_ref(x)"""
  382. keepalive_until_here(x) # otherwise the whole function call is removed
  383. _virtual_ref_finish(vref, x)
  384. virtual_ref_finish.oopspec = 'virtual_ref_finish(x)'
  385. def non_virtual_ref(x):
  386. """Creates a 'vref' that just returns x when called; nothing more special.
  387. Used for None or for frames outside JIT scope."""
  388. return DirectVRef(x)
  389. class InvalidVirtualRef(Exception):
  390. """
  391. Raised if we try to call a non-forced virtualref after the call to
  392. virtual_ref_finish
  393. """
  394. # ---------- implementation-specific ----------
  395. class DirectVRef(object):
  396. def __init__(self, x):
  397. self._x = x
  398. self._state = 'non-forced'
  399. def __call__(self):
  400. if self._state == 'non-forced':
  401. self._state = 'forced'
  402. elif self._state == 'invalid':
  403. raise InvalidVirtualRef
  404. return self._x
  405. @property
  406. def virtual(self):
  407. """A property that is True if the vref contains a virtual that would
  408. be forced by the '()' operator."""
  409. return self._state == 'non-forced'
  410. def _finish(self):
  411. if self._state == 'non-forced':
  412. self._state = 'invalid'
  413. class DirectJitVRef(DirectVRef):
  414. def __init__(self, x):
  415. assert x is not None, "virtual_ref(None) is not allowed"
  416. DirectVRef.__init__(self, x)
  417. def _virtual_ref_finish(vref, x):
  418. assert vref._x is x, "Invalid call to virtual_ref_finish"
  419. vref._finish()
  420. class Entry(ExtRegistryEntry):
  421. _about_ = (non_virtual_ref, DirectJitVRef)
  422. def compute_result_annotation(self, s_obj):
  423. from rpython.rlib import _jit_vref
  424. return _jit_vref.SomeVRef(s_obj)
  425. def specialize_call(self, hop):
  426. return hop.r_result.specialize_call(hop)
  427. class Entry(ExtRegistryEntry):
  428. _type_ = DirectVRef
  429. def compute_annotation(self):
  430. from rpython.rlib import _jit_vref
  431. assert isinstance(self.instance, DirectVRef)
  432. s_obj = self.bookkeeper.immutablevalue(self.instance())
  433. return _jit_vref.SomeVRef(s_obj)
  434. class Entry(ExtRegistryEntry):
  435. _about_ = _virtual_ref_finish
  436. def compute_result_annotation(self, s_vref, s_obj):
  437. pass
  438. def specialize_call(self, hop):
  439. hop.exception_cannot_occur()
  440. vref_None = non_virtual_ref(None)
  441. # ____________________________________________________________
  442. # User interface for the warmspot JIT policy
  443. class JitHintError(Exception):
  444. """Inconsistency in the JIT hints."""
  445. ENABLE_ALL_OPTS = (
  446. 'intbounds:rewrite:virtualize:string:pure:earlyforce:heap:unroll')
  447. PARAMETER_DOCS = {
  448. 'threshold': 'number of times a loop has to run for it to become hot',
  449. 'function_threshold': 'number of times a function must run for it to become traced from start',
  450. 'trace_eagerness': 'number of times a guard has to fail before we start compiling a bridge',
  451. 'decay': 'amount to regularly decay counters by (0=none, 1000=max)',
  452. 'trace_limit': 'number of recorded operations before we abort tracing with ABORT_TOO_LONG',
  453. 'inlining': 'inline python functions or not (1/0)',
  454. 'loop_longevity': 'a parameter controlling how long loops will be kept before being freed, an estimate',
  455. 'retrace_limit': 'how many times we can try retracing before giving up',
  456. 'max_retrace_guards': 'number of extra guards a retrace can cause',
  457. 'max_unroll_loops': 'number of extra unrollings a loop can cause',
  458. 'disable_unrolling': 'after how many operations we should not unroll',
  459. 'enable_opts': 'INTERNAL USE ONLY (MAY NOT WORK OR LEAD TO CRASHES): '
  460. 'optimizations to enable, or all = %s' % ENABLE_ALL_OPTS,
  461. 'max_unroll_recursion': 'how many levels deep to unroll a recursive function',
  462. 'vec': 'turn on the vectorization optimization (vecopt). requires sse4.1',
  463. 'vec_all': 'try to vectorize trace loops that occur outside of the numpy library.',
  464. 'vec_cost': 'threshold for which traces to bail. 0 means the costs.',
  465. 'vec_length': 'the amount of instructions allowed in "all" traces.',
  466. 'vec_ratio': 'an integer (0-10 transfored into a float by X / 10.0) statements that have vector equivalents '
  467. 'divided by the total number of trace instructions.',
  468. 'vec_guard_ratio': 'an integer (0-10 transfored into a float by X / 10.0) divided by the'
  469. ' total number of trace instructions.',
  470. }
  471. PARAMETERS = {'threshold': 1039, # just above 1024, prime
  472. 'function_threshold': 1619, # slightly more than one above, also prime
  473. 'trace_eagerness': 200,
  474. 'decay': 40,
  475. 'trace_limit': 6000,
  476. 'inlining': 1,
  477. 'loop_longevity': 1000,
  478. 'retrace_limit': 0,
  479. 'max_retrace_guards': 15,
  480. 'max_unroll_loops': 0,
  481. 'disable_unrolling': 200,
  482. 'enable_opts': 'all',
  483. 'max_unroll_recursion': 7,
  484. 'vec': 0,
  485. 'vec_all': 0,
  486. 'vec_cost': 0,
  487. 'vec_length': 60,
  488. 'vec_ratio': 2,
  489. 'vec_guard_ratio': 5,
  490. }
  491. unroll_parameters = unrolling_iterable(PARAMETERS.items())
  492. # ____________________________________________________________
  493. class JitDriver(object):
  494. """Base class to declare fine-grained user control on the JIT. So
  495. far, there must be a singleton instance of JitDriver. This style
  496. will allow us (later) to support a single RPython program with
  497. several independent JITting interpreters in it.
  498. """
  499. active = True # if set to False, this JitDriver is ignored
  500. virtualizables = []
  501. name = 'jitdriver'
  502. inline_jit_merge_point = False
  503. _store_last_enter_jit = None
  504. def __init__(self, greens=None, reds=None, virtualizables=None,
  505. get_jitcell_at=None, set_jitcell_at=None,
  506. get_printable_location=None, confirm_enter_jit=None,
  507. can_never_inline=None, should_unroll_one_iteration=None,
  508. name='jitdriver', check_untranslated=True, vectorize=False,
  509. get_unique_id=None, is_recursive=False, get_location=None):
  510. """ NOT_RPYTHON
  511. get_location:
  512. The return value is designed to provide enough information to express the
  513. state of an interpreter when invoking jit_merge_point.
  514. For a bytecode interperter such as PyPy this includes, filename, line number,
  515. function name, and more information. However, it should also be able to express
  516. the same state for an interpreter that evaluates an AST.
  517. return paremter:
  518. 0 -> filename. An absolute path specifying the file the interpreter invoked.
  519. If the input source is no file it should start with the
  520. prefix: "string://<name>"
  521. 1 -> line number. The line number in filename. This should at least point to
  522. the enclosing name. It can however point to the specific
  523. source line of the instruction executed by the interpreter.
  524. 2 -> enclosing name. E.g. the function name.
  525. 3 -> index. 64 bit number indicating the execution progress. It can either be
  526. an offset to byte code, or an index to the node in an AST
  527. 4 -> operation name. a name further describing the current program counter.
  528. this can be either a byte code name or the name of an AST node
  529. """
  530. if greens is not None:
  531. self.greens = greens
  532. self.name = name
  533. if reds == 'auto':
  534. self.autoreds = True
  535. self.reds = []
  536. self.numreds = None # see warmspot.autodetect_jit_markers_redvars
  537. assert confirm_enter_jit is None, (
  538. "reds='auto' is not compatible with confirm_enter_jit")
  539. else:
  540. if reds is not None:
  541. self.reds = reds
  542. self.autoreds = False
  543. self.numreds = len(self.reds)
  544. if not hasattr(self, 'greens') or not hasattr(self, 'reds'):
  545. raise AttributeError("no 'greens' or 'reds' supplied")
  546. if virtualizables is not None:
  547. self.virtualizables = virtualizables
  548. if get_unique_id is not None:
  549. assert is_recursive, "get_unique_id and is_recursive must be specified at the same time"
  550. for v in self.virtualizables:
  551. assert v in self.reds
  552. # if reds are automatic, they won't be passed to jit_merge_point, so
  553. # _check_arguments will receive only the green ones (i.e., the ones
  554. # which are listed explicitly). So, it is fine to just ignore reds
  555. self._somelivevars = set([name for name in
  556. self.greens + (self.reds or [])
  557. if '.' not in name])
  558. self._heuristic_order = {} # check if 'reds' and 'greens' are ordered
  559. self._make_extregistryentries()
  560. assert get_jitcell_at is None, "get_jitcell_at no longer used"
  561. assert set_jitcell_at is None, "set_jitcell_at no longer used"
  562. self.get_printable_location = get_printable_location
  563. self.get_location = get_location
  564. if get_unique_id is None:
  565. get_unique_id = lambda *args: 0
  566. self.get_unique_id = get_unique_id
  567. self.confirm_enter_jit = confirm_enter_jit
  568. self.can_never_inline = can_never_inline
  569. self.should_unroll_one_iteration = should_unroll_one_iteration
  570. self.check_untranslated = check_untranslated
  571. self.is_recursive = is_recursive
  572. self.vec = vectorize
  573. def _freeze_(self):
  574. return True
  575. def _check_arguments(self, livevars, is_merge_point):
  576. assert set(livevars) == self._somelivevars
  577. # check heuristically that 'reds' and 'greens' are ordered as
  578. # the JIT will need them to be: first INTs, then REFs, then
  579. # FLOATs.
  580. if len(self._heuristic_order) < len(livevars):
  581. from rpython.rlib.rarithmetic import (r_singlefloat, r_longlong,
  582. r_ulonglong, r_uint)
  583. added = False
  584. for var, value in livevars.items():
  585. if var not in self._heuristic_order:
  586. if (r_ulonglong is not r_uint and
  587. isinstance(value, (r_longlong, r_ulonglong))):
  588. assert 0, ("should not pass a r_longlong argument for "
  589. "now, because on 32-bit machines it needs "
  590. "to be ordered as a FLOAT but on 64-bit "
  591. "machines as an INT")
  592. elif isinstance(value, (int, long, r_singlefloat)):
  593. kind = '1:INT'
  594. elif isinstance(value, float):
  595. kind = '3:FLOAT'
  596. elif isinstance(value, (str, unicode)) and len(value) != 1:
  597. kind = '2:REF'
  598. elif isinstance(value, (list, dict)):
  599. kind = '2:REF'
  600. elif (hasattr(value, '__class__')
  601. and value.__class__.__module__ != '__builtin__'):
  602. if hasattr(value, '_freeze_'):
  603. continue # value._freeze_() is better not called
  604. elif getattr(value, '_alloc_flavor_', 'gc') == 'gc':
  605. kind = '2:REF'
  606. else:
  607. kind = '1:INT'
  608. else:
  609. continue
  610. self._heuristic_order[var] = kind
  611. added = True
  612. if added:
  613. for color in ('reds', 'greens'):
  614. lst = getattr(self, color)
  615. allkinds = [self._heuristic_order.get(name, '?')
  616. for name in lst]
  617. kinds = [k for k in allkinds if k != '?']
  618. assert kinds == sorted(kinds), (
  619. "bad order of %s variables in the jitdriver: "
  620. "must be INTs, REFs, FLOATs; got %r" %
  621. (color, allkinds))
  622. if is_merge_point:
  623. if self._store_last_enter_jit:
  624. if livevars != self._store_last_enter_jit:
  625. raise JitHintError(
  626. "Bad can_enter_jit() placement: there should *not* "
  627. "be any code in between can_enter_jit() -> jit_merge_point()" )
  628. self._store_last_enter_jit = None
  629. else:
  630. self._store_last_enter_jit = livevars
  631. def jit_merge_point(_self, **livevars):
  632. # special-cased by ExtRegistryEntry
  633. if _self.check_untranslated:
  634. _self._check_arguments(livevars, True)
  635. def can_enter_jit(_self, **livevars):
  636. if _self.autoreds:
  637. raise TypeError("Cannot call can_enter_jit on a driver with reds='auto'")
  638. # special-cased by ExtRegistryEntry
  639. if _self.check_untranslated:
  640. _self._check_arguments(livevars, False)
  641. def loop_header(self):
  642. # special-cased by ExtRegistryEntry
  643. pass
  644. def inline(self, call_jit_merge_point):
  645. assert False, "@inline off: see skipped failures in test_warmspot."
  646. #
  647. assert self.autoreds, "@inline works only with reds='auto'"
  648. self.inline_jit_merge_point = True
  649. def decorate(func):
  650. template = """
  651. def {name}({arglist}):
  652. {call_jit_merge_point}({arglist})
  653. return {original}({arglist})
  654. """
  655. templateargs = {'call_jit_merge_point': call_jit_merge_point.__name__}
  656. globaldict = {call_jit_merge_point.__name__: call_jit_merge_point}
  657. result = rpython_wrapper(func, template, templateargs, **globaldict)
  658. result._inline_jit_merge_point_ = call_jit_merge_point
  659. return result
  660. return decorate
  661. def clone(self):
  662. assert self.inline_jit_merge_point, 'JitDriver.clone works only after @inline'
  663. newdriver = object.__new__(self.__class__)
  664. newdriver.__dict__ = self.__dict__.copy()
  665. return newdriver
  666. def _make_extregistryentries(self):
  667. # workaround: we cannot declare ExtRegistryEntries for functions
  668. # used as methods of a frozen object, but we can attach the
  669. # bound methods back to 'self' and make ExtRegistryEntries
  670. # specifically for them.
  671. self.jit_merge_point = self.jit_merge_point
  672. self.can_enter_jit = self.can_enter_jit
  673. self.loop_header = self.loop_header
  674. class Entry(ExtEnterLeaveMarker):
  675. _about_ = (self.jit_merge_point, self.can_enter_jit)
  676. class Entry(ExtLoopHeader):
  677. _about_ = self.loop_header
  678. def _set_param(driver, name, value):
  679. # special-cased by ExtRegistryEntry
  680. # (internal, must receive a constant 'name')
  681. # if value is None, sets the default value.
  682. assert name in PARAMETERS
  683. @specialize.arg(0, 1)
  684. def set_param(driver, name, value):
  685. """Set one of the tunable JIT parameter. Driver can be None, then all
  686. drivers have this set """
  687. _set_param(driver, name, value)
  688. @specialize.arg(0, 1)
  689. def set_param_to_default(driver, name):
  690. """Reset one of the tunable JIT parameters to its default value."""
  691. _set_param(driver, name, None)
  692. class TraceLimitTooHigh(Exception):
  693. """ This is raised when the trace limit is too high for the chosen
  694. opencoder model, recompile your interpreter with 'big' as
  695. jit_opencoder_model
  696. """
  697. def set_user_param(driver, text):
  698. """Set the tunable JIT parameters from a user-supplied string
  699. following the format 'param=value,param=value', or 'off' to
  700. disable the JIT. For programmatic setting of parameters, use
  701. directly JitDriver.set_param().
  702. """
  703. if text == 'off':
  704. set_param(driver, 'threshold', -1)
  705. set_param(driver, 'function_threshold', -1)
  706. return
  707. if text == 'default':
  708. for name1, _ in unroll_parameters:
  709. set_param_to_default(driver, name1)
  710. return
  711. for s in text.split(','):
  712. s = s.strip(' ')
  713. parts = s.split('=')
  714. if len(parts) != 2:
  715. raise ValueError
  716. name = parts[0]
  717. value = parts[1]
  718. if name == 'enable_opts':
  719. set_param(driver, 'enable_opts', value)
  720. else:
  721. for name1, _ in unroll_parameters:
  722. if name1 == name and name1 != 'enable_opts':
  723. try:
  724. if name1 == 'trace_limit' and int(value) > 2**14:
  725. raise TraceLimitTooHigh
  726. set_param(driver, name1, int(value))
  727. except ValueError:
  728. raise
  729. break
  730. else:
  731. raise ValueError
  732. set_user_param._annspecialcase_ = 'specialize:arg(0)'
  733. # ____________________________________________________________
  734. #
  735. # Annotation and rtyping of some of the JitDriver methods
  736. class ExtEnterLeaveMarker(ExtRegistryEntry):
  737. # Replace a call to myjitdriver.jit_merge_point(**livevars)
  738. # with an operation jit_marker('jit_merge_point', myjitdriver, livevars...)
  739. # Also works with can_enter_jit.
  740. def compute_result_annotation(self, **kwds_s):
  741. from rpython.annotator import model as annmodel
  742. if self.instance.__name__ == 'jit_merge_point':
  743. self.annotate_hooks(**kwds_s)
  744. driver = self.instance.im_self
  745. keys = kwds_s.keys()
  746. keys.sort()
  747. expected = ['s_' + name for name in driver.greens + driver.reds
  748. if '.' not in name]
  749. expected.sort()
  750. if keys != expected:
  751. raise JitHintError("%s expects the following keyword "
  752. "arguments: %s" % (self.instance,
  753. expected))
  754. try:
  755. cache = self.bookkeeper._jit_annotation_cache[driver]
  756. except AttributeError:
  757. cache = {}
  758. self.bookkeeper._jit_annotation_cache = {driver: cache}
  759. except KeyError:
  760. cache = {}
  761. self.bookkeeper._jit_annotation_cache[driver] = cache
  762. for key, s_value in kwds_s.items():
  763. s_previous = cache.get(key, annmodel.s_ImpossibleValue)
  764. s_value = annmodel.unionof(s_previous, s_value) # where="mixing incompatible types in argument %s of jit_merge_point/can_enter_jit" % key[2:]
  765. cache[key] = s_value
  766. # add the attribute _dont_reach_me_in_del_ (see rpython.rtyper.rclass)
  767. try:
  768. graph = self.bookkeeper.position_key[0]
  769. graph.func._dont_reach_me_in_del_ = True
  770. except (TypeError, AttributeError):
  771. pass
  772. return annmodel.s_None
  773. def annotate_hooks(self, **kwds_s):
  774. driver = self.instance.im_self
  775. h = self.annotate_hook
  776. h(driver.get_printable_location, driver.greens, **kwds_s)
  777. h(driver.get_location, driver.greens, **kwds_s)
  778. def annotate_hook(self, func, variables, args_s=[], **kwds_s):
  779. if func is None:
  780. return
  781. bk = self.bookkeeper
  782. s_func = bk.immutablevalue(func)
  783. uniquekey = 'jitdriver.%s' % func.func_name
  784. args_s = args_s[:]
  785. for name in variables:
  786. if '.' not in name:
  787. s_arg = kwds_s['s_' + name]
  788. else:
  789. objname, fieldname = name.split('.')
  790. s_instance = kwds_s['s_' + objname]
  791. classdesc = s_instance.classdef.classdesc
  792. bk.record_getattr(classdesc, fieldname)
  793. attrdef = s_instance.classdef.find_attribute(fieldname)
  794. s_arg = attrdef.s_value
  795. assert s_arg is not None
  796. args_s.append(s_arg)
  797. bk.emulate_pbc_call(uniquekey, s_func, args_s)
  798. def specialize_call(self, hop, **kwds_i):
  799. # XXX to be complete, this could also check that the concretetype
  800. # of the variables are the same for each of the calls.
  801. from rpython.rtyper.lltypesystem import lltype
  802. driver = self.instance.im_self
  803. greens_v = []
  804. reds_v = []
  805. for name in driver.greens:
  806. if '.' not in name:
  807. i = kwds_i['i_' + name]
  808. r_green = hop.args_r[i]
  809. v_green = hop.inputarg(r_green, arg=i)
  810. else:
  811. objname, fieldname = name.split('.') # see test_green_field
  812. assert objname in driver.reds
  813. i = kwds_i['i_' + objname]
  814. s_red = hop.args_s[i]
  815. r_red = hop.args_r[i]
  816. while True:
  817. try:
  818. mangled_name, r_field = r_red._get_field(fieldname)
  819. break
  820. except KeyError:
  821. pass
  822. assert r_red.rbase is not None, (
  823. "field %r not found in %r" % (name,
  824. r_red.lowleveltype.TO))
  825. r_red = r_red.rbase
  826. GTYPE = r_red.lowleveltype.TO
  827. assert GTYPE._immutable_field(mangled_name), (
  828. "field %r must be declared as immutable" % name)
  829. if not hasattr(driver, 'll_greenfields'):
  830. driver.ll_greenfields = {}
  831. driver.ll_greenfields[name] = GTYPE, mangled_name
  832. #
  833. v_red = hop.inputarg(r_red, arg=i)
  834. c_llname = hop.inputconst(lltype.Void, mangled_name)
  835. v_green = hop.genop('getfield', [v_red, c_llname],
  836. resulttype=r_field)
  837. s_green = s_red.classdef.about_attribute(fieldname)
  838. assert s_green is not None
  839. hop.rtyper.annotator.setbinding(v_green, s_green)
  840. greens_v.append(v_green)
  841. for name in driver.reds:
  842. i = kwds_i['i_' + name]
  843. r_red = hop.args_r[i]
  844. v_red = hop.inputarg(r_red, arg=i)
  845. reds_v.append(v_red)
  846. hop.exception_cannot_occur()
  847. vlist = [hop.inputconst(lltype.Void, self.instance.__name__),
  848. hop.inputconst(lltype.Void, driver)]
  849. vlist.extend(greens_v)
  850. vlist.extend(reds_v)
  851. return hop.genop('jit_marker', vlist,
  852. resulttype=lltype.Void)
  853. class ExtLoopHeader(ExtRegistryEntry):
  854. # Replace a call to myjitdriver.loop_header()
  855. # with an operation jit_marker('loop_header', myjitdriver).
  856. def compute_result_annotation(self, **kwds_s):
  857. from rpython.annotator import model as annmodel
  858. return annmodel.s_None
  859. def specialize_call(self, hop):
  860. from rpython.rtyper.lltypesystem import lltype
  861. driver = self.instance.im_self
  862. hop.exception_cannot_occur()
  863. vlist = [hop.inputconst(lltype.Void, 'loop_header'),
  864. hop.inputconst(lltype.Void, driver)]
  865. return hop.genop('jit_marker', vlist,
  866. resulttype=lltype.Void)
  867. class ExtSetParam(ExtRegistryEntry):
  868. _about_ = _set_param
  869. def compute_result_annotation(self, s_driver, s_name, s_value):
  870. from rpython.annotator import model as annmodel
  871. assert s_name.is_constant()
  872. if s_name.const == 'enable_opts':
  873. assert annmodel.SomeString(can_be_None=True).contains(s_value)
  874. else:
  875. assert (s_value == annmodel.s_None or
  876. annmodel.SomeInteger().contains(s_value))
  877. return annmodel.s_None
  878. def specialize_call(self, hop):
  879. from rpython.rtyper.lltypesystem import lltype
  880. from rpython.rtyper.lltypesystem.rstr import string_repr
  881. from rpython.flowspace.model import Constant
  882. hop.exception_cannot_occur()
  883. driver = hop.inputarg(lltype.Void, arg=0)
  884. name = hop.args_s[1].const
  885. if name == 'enable_opts':
  886. repr = string_repr
  887. else:
  888. repr = lltype.Signed
  889. if (isinstance(hop.args_v[2], Constant) and
  890. hop.args_v[2].value is None):
  891. value = PARAMETERS[name]
  892. v_value = hop.inputconst(repr, value)
  893. else:
  894. v_value = hop.inputarg(repr, arg=2)
  895. vlist = [hop.inputconst(lltype.Void, "set_param"),
  896. driver,
  897. hop.inputconst(lltype.Void, name),
  898. v_value]
  899. return hop.genop('jit_marker', vlist,
  900. resulttype=lltype.Void)
  901. class AsmInfo(object):
  902. """ An addition to JitDebugInfo concerning assembler. Attributes:
  903. ops_offset - dict of offsets of operations or None
  904. asmaddr - (int) raw address of assembler block
  905. asmlen - assembler block length
  906. rawstart - address a guard can jump to
  907. """
  908. def __init__(self, ops_offset, asmaddr, asmlen, rawstart=0):
  909. self.ops_offset = ops_offset
  910. self.asmaddr = asmaddr
  911. self.asmlen = asmlen
  912. self.rawstart = rawstart
  913. class JitDebugInfo(object):
  914. """ An object representing debug info. Attributes meanings:
  915. greenkey - a list of green boxes or None for bridge
  916. logger - an instance of jit.metainterp.logger.LogOperations
  917. type - either 'loop', 'entry bridge' or 'bridge'
  918. looptoken - description of a loop
  919. fail_descr - fail descr or None
  920. asminfo - extra assembler information
  921. """
  922. asminfo = None
  923. def __init__(self, jitdriver_sd, logger, looptoken, operations, type,
  924. greenkey=None, fail_descr=None):
  925. self.jitdriver_sd = jitdriver_sd
  926. self.logger = logger
  927. self.looptoken = looptoken
  928. self.operations = operations
  929. self.type = type
  930. if type == 'bridge':
  931. assert fail_descr is not None
  932. else:
  933. assert greenkey is not None
  934. self.greenkey = greenkey
  935. self.fail_descr = fail_descr
  936. def get_jitdriver(self):
  937. """ Return where the jitdriver on which the jitting started
  938. """
  939. return self.jitdriver_sd.jitdriver
  940. def get_greenkey_repr(self):
  941. """ Return the string repr of a greenkey
  942. """
  943. return self.jitdriver_sd.warmstate.get_location_str(self.greenkey)
  944. class JitHookInterface(object):
  945. """ This is the main connector between the JIT and the interpreter.
  946. Several methods on this class will be invoked at various stages
  947. of JIT running like JIT loops compiled, aborts etc.
  948. An instance of this class will be available as policy.jithookiface.
  949. """
  950. # WARNING: You should make a single prebuilt instance of a subclass
  951. # of this class. You can, before translation, initialize some
  952. # attributes on this instance, and then read or change these
  953. # attributes inside the methods of the subclass. But this prebuilt
  954. # instance *must not* be seen during the normal annotation/rtyping
  955. # of the program! A line like ``pypy_hooks.foo = ...`` must not
  956. # appear inside your interpreter's RPython code.
  957. def on_abort(self, reason, jitdriver, greenkey, greenkey_repr, logops, operations):
  958. """ A hook called each time a loop is aborted with jitdriver and
  959. greenkey where it started, reason is a string why it got aborted
  960. """
  961. def on_trace_too_long(self, jitdriver, greenkey, greenkey_repr):
  962. """ A hook called each time we abort the trace because it's too
  963. long with the greenkey being the one responsible for the
  964. disabled function
  965. """
  966. #def before_optimize(self, debug_info):
  967. # """ A hook called before optimizer is run, called with instance of
  968. # JitDebugInfo. Overwrite for custom behavior
  969. # """
  970. # DISABLED
  971. def before_compile(self, debug_info):
  972. """ A hook called after a loop is optimized, before compiling assembler,
  973. called with JitDebugInfo instance. Overwrite for custom behavior
  974. """
  975. def after_compile(self, debug_info):
  976. """ A hook called after a loop has compiled assembler,
  977. called with JitDebugInfo instance. Overwrite for custom behavior
  978. """
  979. #def before_optimize_bridge(self, debug_info):
  980. # operations, fail_descr_no):
  981. # """ A hook called before a bridge is optimized.
  982. # Called with JitDebugInfo instance, overwrite for
  983. # custom behavior
  984. # """
  985. # DISABLED
  986. def before_compile_bridge(self, debug_info):
  987. """ A hook called before a bridge is compiled, but after optimizations
  988. are performed. Called with instance of debug_info, overwrite for
  989. custom behavior
  990. """
  991. def after_compile_bridge(self, debug_info):
  992. """ A hook called after a bridge is compiled, called with JitDebugInfo
  993. instance, overwrite for custom behavior
  994. """
  995. def record_exact_class(value, cls):
  996. """
  997. Assure the JIT that value is an instance of cls. This is a precise
  998. class check, like a guard_class.
  999. """
  1000. assert type(value) is cls
  1001. def ll_record_exact_class(ll_value, ll_cls):
  1002. from rpython.rlib.debug import ll_assert
  1003. from rpython.rtyper.lltypesystem.lloperation import llop
  1004. from rpython.rtyper.lltypesystem import lltype
  1005. from rpython.rtyper.rclass import ll_type
  1006. ll_assert(ll_value != lltype.nullptr(lltype.typeOf(ll_value).TO), "record_exact_class called with None argument")
  1007. ll_assert(ll_type(ll_value) is ll_cls, "record_exact_class called with invalid arguments")
  1008. llop.jit_record_exact_class(lltype.Void, ll_value, ll_cls)
  1009. class Entry(ExtRegistryEntry):
  1010. _about_ = record_exact_class
  1011. def compute_result_annotation(self, s_inst, s_cls):
  1012. from rpython.annotator import model as annmodel
  1013. assert not s_inst.can_be_none()
  1014. assert isinstance(s_inst, annmodel.SomeInstance)
  1015. def specialize_call(self, hop):
  1016. from rpython.rtyper.lltypesystem import lltype
  1017. from rpython.rtyper import rclass
  1018. classrepr = rclass.get_type_repr(hop.rtyper)
  1019. v_inst = hop.inputarg(hop.args_r[0], arg=0)
  1020. v_cls = hop.inputarg(classrepr, arg=1)
  1021. hop.exception_is_here()
  1022. return hop.gendirectcall(ll_record_exact_class, v_inst, v_cls)
  1023. def _jit_conditional_call(condition, function, *args):
  1024. pass
  1025. @specialize.call_location()
  1026. def conditional_call(condition, function, *args):
  1027. if we_are_jitted():
  1028. _jit_conditional_call(condition, function, *args)
  1029. else:
  1030. if condition:
  1031. function(*args)
  1032. conditional_call._always_inline_ = True
  1033. class ConditionalCallEntry(ExtRegistryEntry):
  1034. _about_ = _jit_conditional_call
  1035. def compute_result_annotation(self, *args_s):
  1036. self.bookkeeper.emulate_pbc_call(self.bookkeeper.position_key,
  1037. args_s[1], args_s[2:])
  1038. def specialize_call(self, hop):
  1039. from rpython.rtyper.lltypesystem import lltype
  1040. args_v = hop.inputargs(lltype.Bool, lltype.Void, *hop.args_r[2:])
  1041. args_v[1] = hop.args_r[1].get_concrete_llfn(hop.args_s[1],
  1042. hop.args_s[2:], hop.spaceop)
  1043. hop.exception_is_here()
  1044. return hop.genop('jit_conditional_call', args_v)
  1045. def enter_portal_frame(unique_id):
  1046. """call this when starting to interpret a function. calling this is not
  1047. necessary for almost all interpreters. The only exception is stackless
  1048. interpreters where the portal never calls itself.
  1049. """
  1050. from rpython.rtyper.lltypesystem import lltype
  1051. from rpython.rtyper.lltypesystem.lloperation import llop
  1052. llop.jit_enter_portal_frame(lltype.Void, unique_id)
  1053. def leave_portal_frame():
  1054. """call this after the end of executing a function. calling this is not
  1055. necessary for almost all interpreters. The only exception is stackless
  1056. interpreters where the portal never calls itself.
  1057. """
  1058. from rpython.rtyper.lltypesystem import lltype
  1059. from rpython.rtyper.lltypesystem.lloperation import llop
  1060. llop.jit_leave_portal_frame(lltype.Void)
  1061. class Counters(object):
  1062. counters="""
  1063. TRACING
  1064. BACKEND
  1065. OPS
  1066. RECORDED_OPS
  1067. GUARDS
  1068. OPT_OPS
  1069. OPT_GUARDS
  1070. OPT_GUARDS_SHARED
  1071. OPT_FORCINGS
  1072. OPT_VECTORIZE_TRY
  1073. OPT_VECTORIZED
  1074. ABORT_TOO_LONG
  1075. ABORT_BRIDGE
  1076. ABORT_BAD_LOOP
  1077. ABORT_ESCAPE
  1078. ABORT_FORCE_QUASIIMMUT
  1079. NVIRTUALS
  1080. NVHOLES
  1081. NVREUSED
  1082. TOTAL_COMPILED_LOOPS
  1083. TOTAL_COMPILED_BRIDGES
  1084. TOTAL_FREED_LOOP

Large files files are truncated, but you can click here to view the full file