Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: Are there different programming languages that are compiled to the same intermediate language? Date: Thu, 2 Feb 2023 16:24:11 -0800 (PST) Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-02-007@comp.compilers> References: <23-01-078@comp.compilers> <23-02-001@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="71470"; mail-complaints-to="abuse@iecc.com" Keywords: UNCOL, comment Posted-Date: 02 Feb 2023 20:14:11 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <23-02-001@comp.compilers> Xref: csiph.com comp.compilers:3358 (snip, I wrote) > Could we have a standard intermediate language, with all > features needed, or that ever will be needed? > [The answer to that last question is no. It's a very old bad idea, > with the first failed attempt UNCOL in 1958. -John] I have wondered, though, about a standardized intermediate for a processor family. One could write compilers to generate it, and then updated processors come along with updated code generators. Or even distribute intermediate code, and the installer generates the right version for the processor. This would have been especially useful for Itanium, which (mostly) failed due to problems with code generation. Since the whole idea is that the processor depends on the code generator doing things in the right order. That is, out of order execution, but determined at compile time. Failure to do that meant failure for the whole idea. [Someone comes up with an intermediate language that works for a few source languages and a few targets, and usually publishes a paper about his breakthrough. Then people try to add more front ends and back ends, the intermediate language gets impossibly complex and buggy, and the project is quietly forgotten. I'd think the back end problem is a lot easier now than it was in 1958 since everything is twos complement arithmetic in 8-bit bytes, but the front end is still daunting. If you don't push it too far it's certainly possible to do a lot of work in a largely machine-independent way as LLVM does. -John]