[PATCH] D132646: [LLVM][TableGen] Support combined cells in jupyter kernel

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 04:45:47 PDT 2022


DavidSpickett created this revision.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This changes the default mode to cache the code blocks we're
asked to compile until we see the new `%reset` magic to clear that cache.

This means that if you run several cells in sequence, at the end you're
compiling the code from all the cells at once.

This emulates what the ipython kernel does where it uses a persistent
interpreter state by default.

`%reset` will only be acted on when it's in the cell we're asked to run
(the newest code).

`%args` we will use the most recent value we have cached.

The example notebook has been updated to explain that.

Depends on D132378 <https://reviews.llvm.org/D132378>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132646

Files:
  llvm/utils/TableGen/jupyter/LLVM TableGen.ipynb
  llvm/utils/TableGen/jupyter/LLVM TableGen.md
  llvm/utils/TableGen/jupyter/tablegen_kernel/kernel.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132646.455540.patch
Type: text/x-patch
Size: 13745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220825/82cb96a6/attachment.bin>


More information about the llvm-commits mailing list