<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/yjit/src/invariants.rs, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>YJIT: Speed up block_assumptions_free (#11556)</title>
<updated>2024-09-05T19:39:57+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-09-05T19:39:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f250296efaa7ea3e929eeaecfecd29e5cfe13de3'/>
<id>f250296efaa7ea3e929eeaecfecd29e5cfe13de3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make YJIT a GC root rather than an object (#11343)</title>
<updated>2024-08-08T16:19:35+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-08T16:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0bff07644ba5aff9c844b6cf75a0e1365c35c6a3'/>
<id>0bff07644ba5aff9c844b6cf75a0e1365c35c6a3</id>
<content type='text'>
YJIT currently uses the YJIT root object to mark objects during GC and
update references during compaction. This object otherwise serves no
purpose.

This commit changes it YJIT to be step when marking the GC root. This
saves some memory from being allocated from the system and the GC.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
YJIT currently uses the YJIT root object to mark objects during GC and
update references during compaction. This object otherwise serves no
purpose.

This commit changes it YJIT to be step when marking the GC root. This
saves some memory from being allocated from the system and the GC.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Local variable register allocation (#11157)</title>
<updated>2024-07-15T14:56:57+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-07-15T14:56:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ec773e15f472ae2fe655529ea646d8fb2a4f0919'/>
<id>ec773e15f472ae2fe655529ea646d8fb2a4f0919</id>
<content type='text'>
* YJIT: Local variable register allocation

* locals are not stack temps

* Rename RegTemps to RegMappings

* Rename RegMapping to RegOpnd

* Rename local_size to num_locals

* s/stack value/operand/

* Rename spill_temps() to spill_regs()

* Clarify when num_locals becomes None

* Mention that InsnOut uses different registers

* Rename get_reg_mapping to get_reg_opnd

* Resurrect --yjit-temp-regs capability

* Use MAX_CTX_TEMPS and MAX_CTX_LOCALS</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* YJIT: Local variable register allocation

* locals are not stack temps

* Rename RegTemps to RegMappings

* Rename RegMapping to RegOpnd

* Rename local_size to num_locals

* s/stack value/operand/

* Rename spill_temps() to spill_regs()

* Clarify when num_locals becomes None

* Mention that InsnOut uses different registers

* Rename get_reg_mapping to get_reg_opnd

* Resurrect --yjit-temp-regs capability

* Use MAX_CTX_TEMPS and MAX_CTX_LOCALS</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Move `ocb` parameters into `JITState`</title>
<updated>2024-06-28T15:01:05+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-06-20T22:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bc91e8ff1db329e194f3d9706d94d5261090901d'/>
<id>bc91e8ff1db329e194f3d9706d94d5261090901d</id>
<content type='text'>
Many functions take an outlined code block but do nothing more than
passing it along; only a couple of functions actually make use of it.
So, in most cases the `ocb` parameter is just boilerplate.

Most functions that take `ocb` already also take a `JITState` and this
commit moves `ocb` into `JITState` to remove the visual noise of the
`ocb` parameter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many functions take an outlined code block but do nothing more than
passing it along; only a couple of functions actually make use of it.
So, in most cases the `ocb` parameter is just boilerplate.

Most functions that take `ocb` already also take a `JITState` and this
commit moves `ocb` into `JITState` to remove the visual noise of the
`ocb` parameter.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix comment and counter in rb_yjit_invalidate_ep_is_bp() (#10722)</title>
<updated>2024-05-06T14:28:36+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-05-06T14:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1df1edc080031b8f18b41a5a8d308a667ea89fc1'/>
<id>1df1edc080031b8f18b41a5a8d308a667ea89fc1</id>
<content type='text'>
`mem::take` substitutes an empty instance which makes `jit.ep_is_bp()`
return false.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`mem::take` substitutes an empty instance which makes `jit.ep_is_bp()`
return false.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Take VM lock when invalidating</title>
<updated>2024-04-29T20:08:06+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-04-29T20:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=de0ad3be8ee0ac3b1f8e97dae934e82951721061'/>
<id>de0ad3be8ee0ac3b1f8e97dae934e82951721061</id>
<content type='text'>
We need the lock to patch code safely.
This might fix some Ractor related crashes seen on CI.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need the lock to patch code safely.
This might fix some Ractor related crashes seen on CI.</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Correct signature of rb_yjit_root_mark()</title>
<updated>2024-04-27T01:03:26+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-04-27T00:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ba7c1b142f85a11e11b4861079f3df0f456ab3a'/>
<id>2ba7c1b142f85a11e11b4861079f3df0f456ab3a</id>
<content type='text'>
Even though unused, it's supposed to take a pointer like the C side
expects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even though unused, it's supposed to take a pointer like the C side
expects.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Fix reference update for `Invariants::no_ep_escape_iseqs`</title>
<updated>2024-04-27T01:03:26+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-04-27T00:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=73eeb8643b8dcb5a059cb55a21da2e77a2febd24'/>
<id>73eeb8643b8dcb5a059cb55a21da2e77a2febd24</id>
<content type='text'>
Previously, the update was done in the ISEQ callback. That effectively
never updated anything because the callback itself is given an intact
reference, so it could update its content, and `rb_gc_location(iseq)`
never returned a new address. Update the whole table once in the YJIT
root instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the update was done in the ISEQ callback. That effectively
never updated anything because the callback itself is given an intact
reference, so it could update its content, and `rb_gc_location(iseq)`
never returned a new address. Update the whole table once in the YJIT
root instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>YJIT: Optimize local variables when EP == BP (take 2) (#10607)</title>
<updated>2024-04-25T14:04:53+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2024-04-25T14:04:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ab1a608e7413cdb0f93243eb3e6e20a32cec44e'/>
<id>7ab1a608e7413cdb0f93243eb3e6e20a32cec44e</id>
<content type='text'>
* Revert "Revert "YJIT: Optimize local variables when EP == BP" (#10584)"

This reverts commit c8783441952217c18e523749c821f82cd7e5d222.

* YJIT: Take care of GC references in ISEQ invariants

Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;

---------

Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Revert "Revert "YJIT: Optimize local variables when EP == BP" (#10584)"

This reverts commit c8783441952217c18e523749c821f82cd7e5d222.

* YJIT: Take care of GC references in ISEQ invariants

Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;

---------

Co-authored-by: Alan Wu &lt;alansi.xingwu@shopify.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "YJIT: Optimize local variables when EP == BP" (#10584)</title>
<updated>2024-04-19T16:47:25+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2024-04-19T16:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c8783441952217c18e523749c821f82cd7e5d222'/>
<id>c8783441952217c18e523749c821f82cd7e5d222</id>
<content type='text'>
This reverts commit 4cc58ea0b865f2fd20f1e881ddbd4c4fab0b072c.

Since the change landed call-threshold=1 CI runs have been timing out.
There has also been `verify-ctx` violations. Revert for now while we debug.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 4cc58ea0b865f2fd20f1e881ddbd4c4fab0b072c.

Since the change landed call-threshold=1 CI runs have been timing out.
There has also been `verify-ctx` violations. Revert for now while we debug.</pre>
</div>
</content>
</entry>
</feed>
