llvm-project
f231869e - [MemProf] Handle missing alloc contexts in backend assertion checking (#232422)

Commit
8 days ago
[MemProf] Handle missing alloc contexts in backend assertion checking (#232422) The combined index only serializes the MIB stack ids for allocation records when -combined-index-memprof-context is enabled, which defaults to false in NDEBUG builds. When the thin link is performed by a release build but the ThinLTO backends are compiled with assertions enabled, the distributed indexes contain empty MIB contexts, and checkAllocContextIds in the backend asserts because the summary context is shorter than the IR metadata context. Since the MIB context in the summary can never be empty after trimming the allocation's callsite context, treat an empty context as not serialized and skip the stack id checking for that MIB. Add a regression test to memprof-basic.ll that performs a distributed thin link with -combined-index-memprof-context=false and then runs the backend. Assisted-by: Gemini
Author
Parents
Loading