<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/135598>135598</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[TTI] TargetTransformInfo - avoid default + inconsistent CostKinds
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:analysis,
llvm:transforms
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RKSimon
</td>
</tr>
</table>
<pre>
A large number of the TTI get*Cost() calls have a default value for their TTI::TargetCostKind CostKind argument - usually this is TCK_RecipThroughput but TCK_SizeAndLatency turns up in a few cases. As the CostKind argument is often randomly positioned within other default arguments its often missed entirely.
Ideally we should be not using default values at all and we should require an explicit CostKind to be set for all get*Cost calls.
This should hopefully make it easier as we start trying to use different CostKinds when optimizing for code size / straight line latency etc.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkU81u4zgMfhr5QjRwZDttDj54WgQouqeZ3BeyRdvclSWvSKWbPv1C7k-2mJMNSR_5_ZCGmSaP2Krmh2qeCpNkDrH9-fKLluCLPthr24EzcULwaekxQhhBZoTz-RkmFKW7x8Ci9IPSRxiMcwyzuSAYsDia5AQuxiWEMcSMo5iRqupU1Z1zWcnwF_IWvn5MnNKCXuAOEifj3BVkJgZiOD--_PkTB1rPcwxpmtck0CfZzn_RG3be_mEE_XAFSdEzpBXIg4ERX2EwjLyDjjcBv7cjhjAKeojG27C4K6yBSSh4tPBKMpOHIDPGL2mfUAaST_BCzGgBvVBEd92pslNl92xxE_KKwHNIzkKP4INAYvLTd68YjIBxDoy3_wNE_CdRRDAe8N_V0UByEyEhF2SUzegMvoXzHssHkXN28qPiHFYcU6a1mL8RSAANE0YwvPUVEwUkXjNDCZAYwdI4YsxufbZmeJ3RQ1iFFnrLTzODIVgEpjcEpU_AEg1Ns4Ajj-A-EkIZdlDYtrLH6mgKbPf3dX3YH6t7XcztoJv9oT-UQ4WjPmJVl315wENTl81hqKuxoFaXuinrfV0-6GOld8dyXzVoh_teY9_oB1WXuBhyO-cuyy7EqSDmhO2-aprjQ-FMj463ydc6P1FVZ7xxVyZWWiv9eDuXaDyPIS7bTfNUxDbf3PVpYlWXjlj41kZI3LZSedSbJ3gf9PNnjWc_BrgDcwlkv5JX-geQH4JnYvnmb5Gia2eRlfPa6JPSp4lkTv1uCIvSp43i--dujeEvHETp0yaVlT59qL20-r8AAAD__6LnWZI">