[PATCH] D17288: [CodeGenPrepare] Do select to branch transform when cmp's operand is expensive.

Evandro Menezes via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 08:59:18 PST 2016


evandro added a comment.

I don't like the idea of FdivLatency having a fixed value in cycles.  Firstly, which FP division does this apply to?  Secondly, it fails to consider its throughput.  Thirdly, the default value may be convenient to some targets, but is far from universally acceptable.  Fourthly, it's not a good practice to have this value in one place and also elsewhere, like in the pipeline model, where the same information is richly described in all its variations.

Rather, I'd be more comfortable with a simple boolean value indicating that divisions (not only FP ones) are expensive, defaulting to false.


http://reviews.llvm.org/D17288





More information about the llvm-commits mailing list