ykjit / yk

yk packages
https://ykjit.github.io/yk/
Other
29 stars 7 forks source link

Implement side-tracing. #1287

Closed ptersilie closed 3 months ago

ptersilie commented 3 months ago

Depends on https://github.com/ykjit/ykllvm/pull/180 and requires an update to the ykllvm submodule before merging.

Implement a basic version of side-tracing. The code can still be simplified a bit and there's some corner cases we don't handle yet.

ltratt commented 3 months ago

This broadly looks OK but can we a) document/assert more invariants b) document functions (in particular unexpected properties that callers must maintain)? Even a short sentence or two on functions can really help me as a reader. [e.g. for a while I read the function lives as "is alive" not "all of the variables that aren't dead"! One could blame English for its ambiguity here, but I prefer to think a doc string would have helped me :)]

ptersilie commented 3 months ago

Do you have examples for invariants you want documented/asserted?

vext01 commented 3 months ago

Nice work Lukas. It's evident that this was hard work!

ltratt commented 3 months ago

Do you have examples for invariants you want documented/asserted?

No (other than the lives vec thingy) -- and that's my point :) I think you have some invariants in your head that you know but which I might not realise (and future you might forget). Documenting these is always good because they're so easily forgotten or missed. At least, I'm too stupid to remember them!

ltratt commented 3 months ago

Do you have examples for invariants you want documented/asserted?

No (other than the lives vec thingy) -- and that's my point :) I think you have some invariants in your head that you know but which I might not realise (and future you might forget). Documenting these is always good because they're so easily forgotten or missed. At least, I'm too stupid to remember them!

ptersilie commented 3 months ago

Added some docstrings and fixmes.

ptersilie commented 3 months ago

Ready for re-review.

ltratt commented 3 months ago

Please squash and rebase.

ptersilie commented 3 months ago

Squashed and rebased.

ptersilie commented 3 months ago

Forgot to run clippy. This needs another squashing.

ltratt commented 3 months ago

Please squash.

ptersilie commented 3 months ago

Force-pushed the ykllvm submodule update just now.

ptersilie commented 3 months ago

@ltratt Can you try to merge again. Buildbot has deleted the log and I can't replicate.

ptersilie commented 3 months ago

Ok to squash?

ltratt commented 3 months ago

Please squash.

ptersilie commented 3 months ago

I hope disabling SWT in buildbot.sh was enough. I guess we'll know once we try to merge again.

ltratt commented 3 months ago

I'll press "merge" but this is what I normally use tryci for locally.

ptersilie commented 3 months ago

The test suite still tried to run jitc_llvm tests. Let's hope I got all of them this time.

ltratt commented 3 months ago

Please squash.

ptersilie commented 3 months ago

Squashed.