[BOLT][NFCI] Avoid calling registerName() twice
authorMaksim Panchenko <maks@fb.com>
Mon, 17 Oct 2022 21:15:52 +0000 (14:15 -0700)
committerMaksim Panchenko <maks@fb.com>
Mon, 17 Oct 2022 23:16:31 +0000 (16:16 -0700)
commitdc8035bdddf47b5e1ee91e0147b0e3a404b74261
treee67812ba26ff02d3d1bb3600ca51fa680a8c3a08
parent0674f2ec96422131abde0c042fbf2c11267db210
[BOLT][NFCI] Avoid calling registerName() twice

Calling registerName() for the same symbol twice, even with a different
size, has no effect other than the lookup overhead. Avoid the
redundancy.

Fixes facebookincubator/BOLT#299

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D136115
bolt/lib/Rewrite/RewriteInstance.cpp