Usually an intrinsic is a simple target instruction, it should have a small latency. A real function call has much larger latency. So handle the intrinsic call in function getInstructionLatency().
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| include/llvm/Analysis/TargetTransformInfoImpl.h | ||
|---|---|---|
| 792 ↗ | (On Diff #116096) | I think that you want to do the same thing here that we do in getCallCost (call isLoweredToCall), perhaps like this: if (!static_cast<T *>(this)->isLoweredToCall(F))
return 1; |
| include/llvm/Analysis/TargetTransformInfoImpl.h | ||
|---|---|---|
| 793 ↗ | (On Diff #116263) | Actually, do we want to just return 1 here, or do we want to fall through to the logic below (which returns 3 for FP types)? |
| include/llvm/Analysis/TargetTransformInfoImpl.h | ||
|---|---|---|
| 793 ↗ | (On Diff #116263) | Good catch! It will give more precise result. |
Comment Actions
LGTM
| include/llvm/Analysis/TargetTransformInfoImpl.h | ||
|---|---|---|
| 791 ↗ | (On Diff #116356) | This variable name should start with a capital letter (per our coding conventions). |