Re:Lanai, the mystery CPU architecture in LLVM
by wheybags on Monday March 21, 2022 @03:48PM
(#30758848)
I gotta say, if I was the BDFL of llvm, I would kick this out of tree without a second thought. Why on earth should a foss project support a private architecture? How many man-hours have been wasted waiting for the Lanai backend to compile? Not to mention applying project-wide refactoring to the Lanai code.
[ Parent
| on HN ]
Re:Lanai, the mystery CPU architecture in LLVM
by judofyr on Monday March 21, 2022 @04:02PM
(#30758997)
There's more context in the thread where it was upstreamed: https://lists.llvm.org/pipermail/llvm-dev/2016-February/0951...
Some notable comments:
> I was going to mention it, but you guys know very well the drill, so unless this hardware changes fundamental parts of the middle end in ways that are unnatural to most other targets (doesn't seem that way), then I see no reason why not have it upstream.
> I see no problem with having the backend upstream with the understanding that all the normal policies apply. Getting more people working on ToT is valuable to the community as a whole and provided it's "just another backend" with plenty of tests, the cost is low.
Re:Lanai, the mystery CPU architecture in LLVM
by klausa on Monday March 21, 2022 @04:05PM
(#30759030)
A significant part of work on LLVM comes from Apple, which includes support for quirks of _their_ proprietary chips and platform; and the world is much better for those changes being upstreamed rather than living in a fork somewhere.
Re:Lanai, the mystery CPU architecture in LLVM
by mjw1007 on Monday March 21, 2022 @04:34PM
(#30759346)
There's a big difference between "we are the only people who sell hardware using these chips" and "we are the only people who have access to hardware using these chips".
Re:Lanai, the mystery CPU architecture in LLVM
by Someone on Monday March 21, 2022 @05:22PM
(#30759855)
Removing architectures because they’re obsolete/maintainers can’t be found, I can see (and the llvm maintainers agree. They removed Alpha at some time, for example), but because they’re proprietary? That would mean kicking out x86, x64, ARM, AMD Terascale, IBM’s z/architecture, etc.
I’m sure clang would be very happy with that.
Re:Lanai, the mystery CPU architecture in LLVM
by speed_spread on Monday March 21, 2022 @11:32PM
(#30762457)
Lanai is more than just proprietary, it's an entirely private architecture.
Re:Lanai, the mystery CPU architecture in LLVM
by tedunangst on Monday March 21, 2022 @04:13PM
(#30759120)
> How many man-hours have been wasted waiting for the Lanai backend to compile?
Probably zero? Is it compiled by default?
Re:Lanai, the mystery CPU architecture in LLVM
by jcelerier on Monday March 21, 2022 @04:53PM
(#30759569)
Yes. Run `strings /usr/lib/libLLVM.so| grep -i Lanai` to check on your version ; mine has all the relevant symbols
Re:Lanai, the mystery CPU architecture in LLVM
by tedunangst on Monday March 21, 2022 @05:58PM
(#30760262)
Oh, wow. I'm honestly surprised. My build does not.
Re:Lanai, the mystery CPU architecture in LLVM
by jcelerier on Monday March 21, 2022 @06:42PM
(#30760712)
afaik, by default LLVM builds support for all its supported architectures, I guess you passed -DLLVM_TARGETS_TO_BUILD="X86" or something to cmake when building your llvm ?
Re:Lanai, the mystery CPU architecture in LLVM
by nickm12 on Tuesday March 22, 2022 @11:28PM
(#30774574)
That was my first reaction, too, but then I had a second thought. Google is going to do this work on this in-tree or out-of-tree. If it is done in-tree, then there is a possibility that it will lead to core improvements that would benefit all backends. If out-of-tree, those are guaranteed to happen. I don't think it's a slam dunk, but on the balance it could make sense. And once it is in-tree you can actually validate this hypothesis by seeing the impact (or not) of contributions from Google.