HomePhabricator

[TTI] Remove getOperationCost

Authored by samparker on Apr 8 2020, 11:41 PM.

Description

[TTI] Remove getOperationCost

This API call has been used recently with, a very valid, expectation
that it would do something useful but it doesn't actually query any
backend information. So, remove this method and merge its
functionality into getUserCost. As well as that, also use
getCastInstrCost to get a proper cost from the backend for the
concerned instructions though we only currently return the answer if
it's considered free. The default implementation now also checks
int/ptr conversions too, as well as truncs and bitcasts.

Differential Revision: https://reviews.llvm.org/D76124

Details

Committed
samparkerApr 21 2020, 1:15 AM
Differential Revision
D76124: [TTI] Remove getOperationCost
Parents
rGe90fb82f0f76: [AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.
Branches
Unknown
Tags
Unknown