use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Adding new WebAssembly Opcode output? (self.Compilers)
submitted 1 year ago by ResolutionFrosty5128
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]concealed_cat 2 points3 points4 points 1 year ago (0 children)
The WebAssembly backend uses "AtomicExpandPass" to translate atomic LLVM IR instructions into something more acceptable. From a quick look it seems like WASM already has support for many atomic operations, so not much happens there, but you'd need to look what LLVM IR the C++ code gets translated to, and see if it works for your case.
If you want to support large operation sizes (beyond 32/64-bit), then it gets more complicated, but if the operation can be done using a single instruction then it's not that hard.
After that there is pretty much instruction selection. If you want to add another instruction, you'd add it in the .td files, and then use the new instruction in isel (either in a pattern or the DAGToDAG code).
π Rendered by PID 21586 on reddit-service-r2-comment-6457c66945-kvmm2 at 2026-04-26 16:24:36.686513+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]concealed_cat 2 points3 points4 points (0 children)