[LLVMdev] TargetLowering vs. TargetTransform
nrotem at apple.com
Fri Jan 25 09:48:35 PST 2013
I think that we need to improve ::isTruncateFree, ::isZextFree, etc to include all of the free conversions. Vector and Scalar.
Non-free conversions are marked with setOperationAction so the generic parts of TTI should be able to give a reasonable cost estimation.
The cost tables should contain cases that are not handled by TTI. So, if we have a clever DAGCombine optimization (that TLI can't detect because it is not in the operations table) then we need to add it to the cost table.
On Jan 25, 2013, at 8:21 AM, Renato Golin <renato.golin at linaro.org> wrote:
> Hi all,
> I'm looking for a place where to put the costs of vector (and scalar) cast operations for ARM, but I noticed the TargetTransform methods call the TargetLowering ones when unsure.
> Now, I'm not sure...
> Many casts on ARM are free, and I could build a list of cases where it is true, but should I put this on the lowering or the transform? My main motivation is to get the costs right for the vectorization pass, but I think this should be generally available to any pass that needs it.
> What are the uses of each and, is there a general rule of thumb for using them?
More information about the llvm-dev