Mainframes used to explore this long ago, leveraging different microcode for different workloads keeping the hardware of processing unit the same, https://en.wikipedia.org/wiki/ZIIP
On the other side of the computing spectrum, there were a couple of papers in 2010s about offloading most common mobile tasks (like CSS layouting) to the specialized mobile CPU subsystems. Maybe this should have been implemented if Google made their own mobile CPU.
One optimized for node.js tasks, one for databases, ...