News for hackers. Stuff that matters.
Re:Destroying x86_64 instruction decoders with differential ... by cogman10 on Thursday October 31, 2019 @01:01PM (#21410976)
I really wish Itanium had taken off. IMO it is a superior architecture that was simply ahead of it's time.

Wouldn't it be great if software instead of hardware, had complete control of instruction ordering? Wouldn't it be great to not be limited by the current SIMD restrictions? Wouldn't it be nice if you could choose to spend more compile time to get even faster programs (vs relying on the hardware to do it JIT)?

I mean, I get why it didn't happen. Stupid history chose wrong (Like making electrons have a negative charge).

Re:Destroying x86_64 instruction decoders with differential ... by rayiner on Thursday October 31, 2019 @01:54PM (#21411660)
Itanium was one of those scenarios where theory blew up in practice. In theory it’s great for software to have complete control of instruction ordering. In practice, software simply doesn’t have enough information at compile time to do that. As proven by the fact that even Itanium moved to an OOO architecture in Paulson.

It comes down to memory latency. Even an L3 cache hit these days is 30-40 cycles. It’s hard to predict when loads and stores will miss the cache, so there is little a compiler can do to account for that in scheduling. OOO can cover the latency of an L3 cache hit pretty well. And once you add it for that, why not just pretend you’ve got a sequential machine?

Re:Destroying x86_64 instruction decoders with differential ... by roca on Thursday October 31, 2019 @03:36PM (#21412741)
Right. Generally, memory accesses in real-world software are unpredictable enough (no matter how good the compiler is) that single-threaded execution is always going to get a big boost from OOO.

An interesting question is why Intel believed otherwise when they created IA64. I think there's a strong case that publication bias and other pathologies of academic compuer science destroyed billions of dollars in value, and would have killed Intel had it not had monopoly power.

Re:Destroying x86_64 instruction decoders with differential ... by wolfgke on Thursday October 31, 2019 @04:01PM (#21413074)
> An interesting question is why Intel believed otherwise when they created IA64.

For numerics code, VLIW can indeed offer huge advantages. Unluckily, computer programs from different areas have quite a different structure and thus do not profit from VLIW so much.

Re:Destroying x86_64 instruction decoders with differential ... by cogman10 on Thursday October 31, 2019 @06:38PM (#21414509)
I'm not too far in the know for how the OOO stuff works/worked within Paulson. Did OOO migrate instruction execution between batches? Did it simply ignore them all together?

I'd still imagine you'd see benefits for the same reason you see SIMD benefits (assuming you aren't doing a whole bunch of pointer chasing).

Re:Destroying x86_64 instruction decoders with differential ... by dnautics on Thursday October 31, 2019 @02:00PM (#21411740)
The stupid quip about sufficiently advanced compilers has actually been true until relatively recently, and shipping shared libraries has also been a thing for a while until recently (we basically ship shared libraries as statically linked these days, aka containers)
Re:Destroying x86_64 instruction decoders with differential ... by cogman10 on Thursday October 31, 2019 @06:31PM (#21414456)
I'd say roughly around 2010 maybe 2015, compilers got to the point where they didn't totally suck at vectorization.

Before that point, yeah, they were just too dumb to be able to make Itanium fast.

Re:Destroying x86_64 instruction decoders with differential ... by dnautics on Friday November 01, 2019 @03:10AM (#21416777)
Polyhedral optimization is going to be exciting too.
Re:Destroying x86_64 instruction decoders with differential ... by wolfgke on Thursday October 31, 2019 @01:16PM (#21411193)
> I really wish Itanium had taken off. IMO it is a superior architecture that was simply ahead of it's time.

Itanium was an architecture that was designed for "big iron", i.e. fast, powerful computers. It is thus, in my opinion, much harder to "scale down" to, say, mobile devices than x86.

Re:Destroying x86_64 instruction decoders with differential ... by unlinked_dll on Thursday October 31, 2019 @01:24PM (#21411293)
x86 hasn't really proven that it scales down well for mobile devices either.
Re:Destroying x86_64 instruction decoders with differential ... by wolfgke on Thursday October 31, 2019 @03:53PM (#21412989)
Intel produced SoCs for mobile devices, concretely Speatrum SC9853i and Spreadtrum SC9861G-IA.

If you want to scale even further down, consider Intel Quark (https://en.wikipedia.org/wiki/Intel_Quark). For an analysis why it failed in the market, consider http://linuxgizmos.com/who-killed-the-quark/

To me, it seems that the central reason why these chips failed commercially is that at the lower end, SoCs offer a much thinner margins than CPUs for laptops, desktop PCs and servers.

Re:Destroying x86_64 instruction decoders with differential ... by toast0 on Thursday October 31, 2019 @03:41PM (#21412808)
There are some x86 Android phones, and Windows 10 Mobile's Continuum looked designed to be run on an x86 phone, but Intel killed that line of processors before Microsoft built a device.
Re:Destroying x86_64 instruction decoders with differential ... by saagarjha on Thursday October 31, 2019 @05:32PM (#21413905)
Interestingly enough, the baseband for iPhone XS runs x86.
Re:Destroying x86_64 instruction decoders with differential ... by vbezhenar on Thursday October 31, 2019 @04:13PM (#21413215)
My friend uses Asus Zenfone which runs on Intel CPU. It works fine. Intel might have failed with economics or marketing, but engineering works.
Re:Destroying x86_64 instruction decoders with differential ... by cogman10 on Thursday October 31, 2019 @06:29PM (#21414443)
I'd say the opposite is true. There isn't anything about Itanium that makes it worse for mobile. In fact, the opposite is true, it would be better for mobile because it was designed to push more of the optimizations into the compiler vs the hardware. That means less power required to do optimizations against running software.

Because Itanium fits with mobile just as well as ARM does for much of the same reasons. After all, Itanium is essentially a RISC architecture.

It never touched mobile because it was dead before mobile computing was really taking off. Heck, it was dead before ARM got a stranglehold on the market.

Re:Destroying x86_64 instruction decoders with differential ... by acdha on Friday November 01, 2019 @09:59AM (#21418853)
> There isn't anything about Itanium that makes it worse for mobile. In fact, the opposite is true, it would be better for mobile because it was designed to push more of the optimizations into the compiler vs the hardware. That means less power required to do optimizations against running software.

There's a big problem with that: the VLIW layout is not as memory efficient so programs were larger and the instruction cache needed to be larger to compensate. Mobile architectures have traditionally had smaller caches and less memory bandwidth to save power.

There is an interesting what-if question here: one of the big things which killed Itanium was the poor x86 compatibility meaning that while it was not entirely uncompetitive when running highly-optimized native code, it was massively slower for legacy apps even before you factored in the price. Compiler technology has improved by a huge degree since the 90s and in particular it's interesting to imagine would could happen in an Apple AppStore-style environment where developers ship LLVM bitcode which is recompiled for the target device, substantially avoiding the need to run legacy code.

Re:Destroying x86_64 instruction decoders with differential ... by burfog on Friday November 01, 2019 @03:01AM (#21416737)
Mobile is expected to run JIT translated code.

Itanium's design was finalized before JIT became important. Suddenly JIT was everywhere and spreading: Java, C# .net CLR stuff, Javascript, and more.

JIT output can not be well-optimized because that takes too long. The code must compile while the end-user waits, so there is no time to do anything good. The code will be terrible. Itanium can't handle that.

Re:Destroying x86_64 instruction decoders with differential ... by PeCaN on Thursday October 31, 2019 @09:45PM (#21415607)
> There isn't anything about Itanium that makes it worse for mobile.

Shit code density?

Re:Destroying x86_64 instruction decoders with differential ... by gok on Thursday October 31, 2019 @02:39PM (#21412170)
VLIW has ultimately failed several times outside of IA-64. It was briefly tried for GPUs too.
Re:Destroying x86_64 instruction decoders with differential ... by nipxx on Thursday October 31, 2019 @03:24PM (#21412611)
It's alive and kicking on the Texas Instruments DSP chips. You can get incredible performance out of them, but you pay with horrible compile times.

To give you a taste what these chips do:

- 64 registers, 8 execution units, so 8 instruction can execute per cycle. Each instruction executes in a single cycle but may writes back the result later (multiplications do this for example). It's your responsibility to make sure you don't generate a conflict.

- for loops the hardware has a very complicated hardware scheduling mechanism that effectively lets you split the instruction pointer into 8 different pointers, so you can run multiple instances of a loop at the same time.

I wrote assembler code for that. Sudoku is a piece of cake compared to it.

Re:Destroying x86_64 instruction decoders with differential ... by tenebrisalietum on Thursday October 31, 2019 @06:23PM (#21414399)
I'm feeling extremely masochistic. What's the model number of one of these chips and/or a pointer to its instruction set reference?
Re:Destroying x86_64 instruction decoders with differential ... by nipxx on Friday November 01, 2019 @12:47AM (#21416348)
For me it was the TMS320C64x+ There are newer versions of that chip out there with floating point support.

The glory instruction set reference is here:

https://www.ti.com/lit/ug/spru732j/spru732j.pdf