llvm-project
0c0b0ea8 - [SPARC] Mark branches as being expensive in early Niagara CPUs (#166489)

Commit
37 days ago
[SPARC] Mark branches as being expensive in early Niagara CPUs (#166489) Early Niagara processors (T1-T3) lacks any branch predictor, yet they also have a pipeline long enough that the delay slot cannot cover for all of the branch latency. This means that branch instructions will stall the processor for a couple cycles, which makes them an expensive operation. Additionally, the high cost of branching means that it's still profitable to prefer conditional moves even when the conditional is predictable, so let LLVM know about both things. On SPARC T2, a pgbench test seem to show a modest, but pretty consistent speedup (up to around 3%).
Author
Parents
Loading