5 ms·
Apple is making its apps LLVM-based now? Doesn't that mean they could soon push for ARM CPUs in Mac OS, too?
by higherpurpose 11y ago
Apple is making its apps LLVM-based now? Doesn't that mean they could soon push for ARM CPUs in Mac OS, too?
- willvarfar 11y agoIt means exactly that. Here's a nice article describing it: > This means that apps can automatically “take advantage of new processor capabilities we might be adding in the future, without you re-submitting to the store.” http://thenextweb.com/apple/2015/06/17/apples-biggest-developer-news-at-wwdc-that-nobodys-talking-about-bitcode/ http://thenextweb.com/apple/2015/06/17/apples-biggest-develo...
- vsl 11y agoIt doesn't. Bitcode is arch specific and unportable. It allows some instruction-set level optimizations, but not changing e.g. endianness (exactly what x64 and arm differ in) or type sizes.
- willvarfar 11y agoARM cores, although technically bi-endian, are in practice little-endian. I play writing LLVM backends, and its entirely viable to even do things like rewrite float80 and other assumptions that a front-end has made for a particular target.
- jakobegger 11y agoBut what about things like non-aligned memory access (allowed on x86, not allowed on ARM)? Porting code across architectures can't be as easy as just swapping LLVM backends, when not even recompiling the code is sufficient.
- willvarfar 11y agoModern ARMs are just fine with unaligned access. There will be ISAs sufficiently different that you cannot make bitcode generated when targetting one not be massaged to fit another, but they are not mainstream. The mainstream are all increasingly similar 64-bit targets.
- crucialfelix 11y agoyes. developers will be able to submit apps as LLVM Bitcode which means that Apple can switch to ARM for some new device and recompile the app without the developer having to resubmit it. It also means the end of Universal binaries as Apple can thin the compiled app for each target device. the PPC switch over was painful, as was the 32 versus 64 bit era. They want to avoid that in the future.
- pg314 11y agoAt the moment LLVM bit code generated by Clang is still architecture dependent (e.g. sizeof() still generates code that depends on the architecture).
- willvarfar 11y agoBut modern CPUs are all converging on 64-bits, for example. Use of SIMD intrinsics are a tougher nut, but I've actually been playing with them at an IR level for hobby stuff and I declare its not intractable.
- mappu 11y agoConverging on 64-bit CPUs doesn't mean converging on standard `sizeof()` values (c.f. windows x86_64 ABI is LLP64 but linux x86_64 ABI is LP64)
- willvarfar 11y agoIt's easy to loose sight of the fact that we are talking about 64bit OS X here... The diff between ir that targeted x86-64 and arm64 and so on is something Apple has some control over. I know, I play with a hobby llvm backend that retargets.
- crucialfelix 11y agotrue, I didn't mean that it would solve a future 32 v 64 problem.
- 11y ago
- masklinn 11y agoOr, the other way around, for x86_64 in mobile devices. Now they already can, technically (via fat binaries, they've already been through multiple architectural transitions), the interesting part is they could now go through these transitions without developers having to be involved.
- Alphasite_ 11y agoNo, bit odd is too low level for this and I believe it's only used for iOS apps ATM.