On the same way than cproc+QBE I guess, 70% of gcc speed in my benchmarks. The more real-life alternatives to those abominations of gcc and clang, the merrier. I wish the linux kernel devs did care to keep the door _reasonably_ open for such compilers (with assembler source files as alternative to inline assembly, some extensions avoidance and niche expensive compiler features). This is another case of why super comp…
QBE is ... problematic. The source has no comments, single letter variable names. It is not written to be extended by anyone else other than the author. I would recommend libfirm over QBE by at least 10km. https://libfirm.github.io/ https://github.com/libfirm/libfirm
TinyCompiler: A compiler in a week-end
81–90 of 120 posts
Re: TinyCompiler: A compiler in a week-end
#82Interesting off-topic—I noticed this paragraph: > Personally, I get a twisted pleasure wearing a T-shirt with this print in the 2020s, even though I hate being a walking billboard. But the number of angry comments from confused people makes up for any moral discomfort of advertising on my belly! It's possible the 'angry comments' are from people who may have mistaken it for an antisemitic, white supremacist symbol[1]…
Re: TinyCompiler: A compiler in a week-end
#83Interesting off-topic—I noticed this paragraph: > Personally, I get a twisted pleasure wearing a T-shirt with this print in the 2020s, even though I hate being a walking billboard. But the number of angry comments from confused people makes up for any moral discomfort of advertising on my belly! It's possible the 'angry comments' are from people who may have mistaken it for an antisemitic, white supremacist symbol[1]…
Where is that paragraph?
Re: TinyCompiler: A compiler in a week-end
#84Re: TinyCompiler: A compiler in a week-end
#85Interesting off-topic—I noticed this paragraph: > Personally, I get a twisted pleasure wearing a T-shirt with this print in the 2020s, even though I hate being a walking billboard. But the number of angry comments from confused people makes up for any moral discomfort of advertising on my belly! It's possible the 'angry comments' are from people who may have mistaken it for an antisemitic, white supremacist symbol[1]…
Re: TinyCompiler: A compiler in a week-end
#86Earlier quoted context omitted.
Thank you for the reference, I'll check it. Why not fully maximal SSA + DCE? I mean, other than timings consideration. Fully maximal does not even need any graph traversal, it is entirely local to each block.
I think it will introduce too many redundant phis, but I've never used it in practice - so I can only speculate. I'm not convinced DCE will clean maximal SSA up substantially. Even the classic Cytron et al algorithm must be combined with liveness analysis to avoid placing dead phis (that is, it does not produce pruned SSA by default). In the past, there was always a fear that SSA has the potential to cause quadratic…
Re: TinyCompiler: A compiler in a week-end
#87I appreciate how wonderfully simple and dependency free this is. More often than not people just want to write a compiler of sorts without bison or yacc, or LLVM, and just convert expressions into assembler or vm-like instructions that _just run_. This is a great starting point for that, and I wish I had something like it 10 years ago. (Crenshaw's Let's Build a Compiler is an excellent source too if you want to go on…
Re: TinyCompiler: A compiler in a week-end
#88Re: TinyCompiler: A compiler in a week-end
#89On the same way than cproc+QBE I guess, 70% of gcc speed in my benchmarks. The more real-life alternatives to those abominations of gcc and clang, the merrier. I wish the linux kernel devs did care to keep the door _reasonably_ open for such compilers (with assembler source files as alternative to inline assembly, some extensions avoidance and niche expensive compiler features). This is another case of why super comp…
QBE is ... problematic. The source has no comments, single letter variable names. It is not written to be extended by anyone else other than the author. I would recommend libfirm over QBE by at least 10km. https://libfirm.github.io/ https://github.com/libfirm/libfirm
But it is written in plain and simple C99, so it is at least much less toxic than LLVM.
I wonder how cparser (did not check if it was plain and simple C)+libfirm compare in performance to cproc+QBE on my benchmarks. May have to take some time to check that.
Whatever the results, it is always good to have, again, a real life alternative for optimizing C toolchains.
The main issues are the heavy usage of gcc extensions by linux (and glibc, etc).
Re: TinyCompiler: A compiler in a week-end
#90On the same way than cproc+QBE I guess, 70% of gcc speed in my benchmarks. The more real-life alternatives to those abominations of gcc and clang, the merrier. I wish the linux kernel devs did care to keep the door _reasonably_ open for such compilers (with assembler source files as alternative to inline assembly, some extensions avoidance and niche expensive compiler features). This is another case of why super comp…
Circle frontend, that includes all C++17 (when it was current) and the Rust related extensions, was implemented by a single guy.