[PATCH] D37471: [TTI] Implement getCastInstrCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 06:54:37 PDT 2017


samparker added a comment.

Is there any way of telling which API each function is apart of? I was thinking that there was a model driven by TLI and DataLayout and then one specified by a TTI implementation in the backend. Most of the functions end up returning a TargetCostConstant, which I see are the mixed costs you described. Does it make sense to try to bundle all those costs into one enum?

The issue I was having was that my test case wasn't being simplified into a single block because of the estimated cost of the trunc i64. Like I said, I know this is more easily handled by implementing another hook in the backend, but thought it would be better to try something in the mid-end too.

thanks,
sam


https://reviews.llvm.org/D37471





More information about the llvm-commits mailing list