[llvm] [BOLT] Improve handling of relocations targeting specific instructions (PR #66395)
Job Noorman via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 09:16:16 PDT 2023
mtvec wrote:
I've noticed one downside/annoyance with this approach. When emitting loads/stores for instrumentation (e.g., in `createInstrIncMemory`), I need to attach labels to instructions (same as the example given in the description of this patch). However, `createInstrIncMemory` is `const` while `setLabel` cannot be. Moreover, I really should add an `AllocatorIdTy` argument to `setLabel` and this means that `createInstrIncMemory` also needs one (it's called in the context of `runOnEachFunctionWithUniqueAllocId`).
None of this is a blocker (I have a working instrumentation implementation using the approach above) but it feels slightly annoying so I'd be interested in thoughts on this.
https://github.com/llvm/llvm-project/pull/66395
More information about the llvm-commits
mailing list