[compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 23:29:20 PDT 2023


================
@@ -565,6 +674,13 @@ void InstrProfSymtab::finalizeSymtab() {
   llvm::sort(AddrToMD5Map, less_first());
   AddrToMD5Map.erase(std::unique(AddrToMD5Map.begin(), AddrToMD5Map.end()),
                      AddrToMD5Map.end());
+  // GlobalVariable address ranges should not overlap; so sort by either
----------------
minglotus-6 wrote:

> Readonly string and other primitive constants can be merged such that the symbol names point to the same address range.

This makes sense. I think a similar example is a global alias and its corresponding object. Update the comment to 'VTable objects address ranges shouldn't overlap'

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


More information about the llvm-commits mailing list