summaryrefslogtreecommitdiff
path: root/include/ruby/internal
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-08-04 10:12:25 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-08-29 08:47:06 -0700
commit24ddc07d6ee02620b8be7b4defd903897bb97845 (patch)
tree078af9b2f901bcfeb9c47f069335865140050a33 /include/ruby/internal
parentfe172aac0465160ec5a02c687ab1dc6ade2c090a (diff)
Fix live_ranges idx calculation (https://github.com/Shopify/ruby/pull/353)
forward_pass adjusts the indexes of our opnds to reflect the new instructions as they are generated in the forward pass. However, we were using the old live_ranges array, for which the new indexes are incorrect. This caused us to previously generate an IR which contained unnecessary trivial load instructions (ex. mov rax, rax), because it was looking at the wrong lifespans. Presumably this could also cause bugs because the lifespan of the incorrectly considered operand idx could be short. We've added an assert which would have failed on the previous trivial case (but not necessarily all cases). Co-authored-by: Matthew Draper <matthew@trebex.net>
Diffstat (limited to 'include/ruby/internal')
0 files changed, 0 insertions, 0 deletions