================ @@ -119,6 +130,7 @@ class BoltAddressTranslation { uint64_t FuncAddress); std::map<uint64_t, MapTy> Maps; + std::map<uint64_t, MapTy> ColdMaps; ---------------- rafaelauler wrote:
Kind of weird that this is only used for write(), and not during parsing. There is a lost symmetry between write() and parse() after this diff. Maybe move ColdMaps to live inside write() method then, since it is never used outside of it. Once we write(), we're not able to call translate(), since we lost cold functions in Maps. Not that this workflow was ever used, but if this class was meant to have any sort of "serialize/deserialize" workflow, now they are out of sync, and design-wise it feels off. So maybe we should use both a private "Maps" / "ColdMaps" during write(), so the code doesn't read as if "translate" depends on either write or parse -- it should depends only on parse. And maybe write() should be a stateless static method. https://github.com/llvm/llvm-project/pull/76903 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits