[PATCH] D22317: Codegen: Tail Merge: Be less aggressive with special cases.

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 15:55:37 PDT 2016


iteratee added a comment.

I've looked over the results with and without this patch, and I've come to the conclusion that It's correct to make this less aggressive generally.

For an unconditional branch, ignoring the threshold because of fallthrough is correct, because there is no runtime cost if the jump happens earlier. It was going to happen anyway.
For a conditional branch this isn't true. We trade a conditional branch and a jump (which may not execute), for a jump (which always executes) and a conditional branch. Given this, I think it's reasonable to enforce the threshold in this case.


Repository:
  rL LLVM

https://reviews.llvm.org/D22317





More information about the llvm-commits mailing list