[Diffusion] rL248439: set div/rem default values to 'expensive' in TargetTransformInfo's cost model

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 09:00:38 PDT 2015


spatel added a comment.

The intent of using TTI here was to allow targets to override that cost as needed. I'm guessing any GPU target would want to make fdiv cost == TCC_Basic, so it would get speculated. We'd eventually want to do the same for sqrt and possibly other intrinsics; ie, these are defaulting to cheap currently, but I think we'll want to default them to 'expensive' and then have targets override that. Apologies for the CPU-centricism, but it seems baked into the TTI cost model.

Update on the other patches that I had planned:

1. http://reviews.llvm.org/D13297 (CGP undo of speculation) checked in at: http://reviews.llvm.org/rL250743
2. I'm working on a patch to SimplifyCFG to allow more speculation, but the intent is #1 will undo that, so it's not going to change the overall behavior for the 'expensive' op case for simple examples.


Users:
  spatel (Author, Auditor)
  3.7-release (Auditor)
  llvm-commits (Auditor)
  tstellarAMD (Auditor)

http://reviews.llvm.org/rL248439





More information about the llvm-commits mailing list