4 ms·
It's not been "already optimized". The kind of machine language affects optimizations too. An example of this is branch delay slots. Some RISCs have these. Wit
by Manishearth 10y ago
It's not been "already optimized". The kind of machine language affects optimizations too.
An example of this is branch delay slots. Some RISCs have these. With a branch delay slot, the instruction after a branch is unconditionally executed, which lets the processor pipeline the branch efficiently. You need to tweak your codegen so that some earlier instruction will get delayed till the branch slot if you want to make full use of your CPU cycles.
Each target arch has its own quirks when it comes to stuff like this, and there's a different way to write efficient code for each. So it's not correct that optimizations have already been done.
(This is not necessarily the reason why tablegen is hard, it's just another factor)