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
Event Timeline
include/llvm/Analysis/TargetTransformInfoImpl.h | ||
---|---|---|
791 | 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 | ||
---|---|---|
792 | 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 | ||
---|---|---|
792 | Good catch! It will give more precise result. |
Comment Actions
LGTM
include/llvm/Analysis/TargetTransformInfoImpl.h | ||
---|---|---|
791 | This variable name should start with a capital letter (per our coding conventions). |
I think that you want to do the same thing here that we do in getCallCost (call isLoweredToCall), perhaps like this: