[llvm] [BOLT] Refactor MCInstReference and move it to Core (NFC) (PR #155846)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 17 09:45:01 PDT 2025


aaupov wrote:

@atrosinenko 
Using a pointer to the basic block plus an index sounds reasonable (I've used it in a DFG prototype). 
In terms of reference invalidation on insertion/removal, we could provide MCInstReferences through a class tracking if references are valid (potentially on a per-BB basis). For future iterations, it would also be nice to have a functionality to fix invalid references, but  preventing incorrect usage is my primary concern for now.

https://github.com/llvm/llvm-project/pull/155846


More information about the llvm-commits mailing list