<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/89210>89210</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp: 2 * pointless vector copy ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
tablegen,
code-quality,
llvm,
llvm:binary-utilities
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
1.
/llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp:79:27: performance: Function parameter 'Fusions' should be passed by const reference. [passedByValue]
Source code is
void MacroFusionPredicatorEmitter::emitMacroFusionDecl(
std::vector<Record *> Fusions, PredicateExpander &PE, raw_ostream &OS) {
2.
llvm/utils/TableGen/MacroFusionPredicatorEmitter.cpp:96:27: performance: Function parameter 'Fusions' should be passed by const reference. [passedByValue]
Duplicate.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEkzGPnDAQhX_N0IwOgQ3HUlDs3i6popxyUdposIddJwYT21zCv49gk7tNk-aKNEjjZ5k335uhEMx5ZG6gPEB5TGiOF-cbrTqZF0nn9NI8RYpGIY1kl8Ae1TSpC6tvGGgJIPeQHSH7_c3T2wpEa-3zAKKdo7EBRPuJOsvveATRviflXTsH48ZHz9oois6fBhMj-1RNE8h9VYPciwrkHif2vfMDjYrXsp1HFY0bcSJPA0f2CKK6vhZAVBgubrYaO8aJQmCN3YLKjSGi5549j4pThPJwVQ_LZ7IzQ3m8tf_kZq8YldOMJtwqz85o_FcDKxa558HEm1tHVhbE7voEImKI-nrxmVV0HuTDR1bOawSxB3nCl34e8M8f-PRzolFv_d4_nlbJ048vLkTPNKyHH55A1AjV4daw-CuXN4VS3__XUI7zZDcQaaIbqWtZU8JNXuWykFVR5Mml6bNdXmvdEWVlqRTtup5UJfusJ3lfSU5MIzJRZEW-y7MyK_KU6zrv-3pXlJ3IKdNQZDyQselKKnX-nJgQZm52tcizxFLHNmwbI0Rc4Z1XeALEAwixjsvd95msicvL4ZX4bSH3nRnJL3drCiYaDqteHhPfrPpdN58DFJk1IYZXG9FEy82b8kOxjhdOzozRcgh4HT5UbloQZJvM3jaXGKdtt0ULoj2beJm7VLnhdaM3k5N3X1lFEO3GZzWzIfoVAAD__7XyZSQ">