7 ms·
LLVM is one impressive (and scary) piece of technology.
by gosukiwi 6y ago
LLVM is one impressive (and scary) piece of technology.
- axaxs 6y agoImpressive, sure. But curious what makes it scary to you?
- mulcahey 6y agohave you seen their logo?
- BoorishBears 6y agoHave you heard of the dragon book?
- jasonmp85 6y agoLLVM's logo is a wyvern
- BoorishBears 6y agoYou mean > a winged two-legged dragon with a barbed tail ? https://llvm.org/Logo.html https://llvm.org/Logo.html > The LLVM logo is a stylized wyvern (a kind of dragon). Dragons have connotations of power, speed and intelligence, and can also be sleek, elegant, and modular (err, maybe not). In addition, there is a series of influential compiler books going back to 1977 which featured dragons on the cover. Leave it to HN to jump to nitpick something as meaningless a wyvern vs a dragon but not even take 5 seconds to check the primary source
- anoncareer0212 6y agowhat
- BoorishBears 6y agoWell the nitpicking is pretty well accepted at this point, but since when are spammy comments like this a thing?
- rmdashrfstar 6y ago99% of readers either read and voted or moved on, it’s just one guy who decided to nitpick you, not some nebulous “HN” hive mind collective.
- BoorishBears 6y agouseless nitpicks is a time honored HN tradition.
- mhh__ 6y agoThe LLVM way of doing C++ is basically a wet dream when it comes to C++-isms e.g. not many C++ projects do their own dynamic casts and get away with it. LLVM is fairly well-structured, especially compared to GCC. I don't find it scary but it is a big fat fucker of a codebase.
- ndesaulniers 6y agoAll dyn_cast does is move runtime polymorphism to compile time polymorphism.
- pjmlp 6y agoOWL and MFC come to mind.
- deleted 6y ago[deleted]
- bonzini 6y agoFWIW this particular optimization has been in GCC for about 15 years, though it was only enabled by default in GCC 8. It's not rocket science.
- isatty 6y agoIdk, not learning compiler theory is one of my regrets from school and this does seem like rocket science to me.
- jjice 6y agoThere are a ton of great books out there! If you're looking for a bit of the whole shebang, check out Compilers: Principles, Techniques, and Tools (aka, The Dragon Book). It's an older book, but a lot of what is described in there is still very relevant and good info. If you want a more high level overview at first, I'd recommend Crafting Interpreters [0] and Writing a Compiler/Interpreter in Go [1]. The latter two focus more on lexing, parsing, and intermediate code generation. [0] https://craftinginterpreters.com/ https://craftinginterpreters.com/ [1] https://compilerbook.com/ https://compilerbook.com/
- isatty 6y agoI know I should get to it - maybe I should've done that during the COVID lockdown eh? Thanks for the links, I'll check them out.
- why_only_15 6y agoCommenters elsewhere in the thread are saying this optimization existed in LLVM as well, just that this is a more deep/efficient version of it.
- bonzini 6y agoYes, I'm referring to this particular version.