[llvm-profgen] Do not cache the frame location stack during computing inlined context...
authorwlei <wlei@fb.com>
Wed, 26 Oct 2022 04:07:55 +0000 (21:07 -0700)
committerwlei <wlei@fb.com>
Wed, 26 Oct 2022 04:08:36 +0000 (21:08 -0700)
commit91cc53d5a455e807507b08ca976e266621da07a8
treed58b01d26aab7dc22ddb8237fa7d762ba32881aa
parent3f9d51ab5a1d0bd23acccca13d060ded7dff2086
[llvm-profgen] Do not cache the frame location stack during computing inlined context size

In `computeInlinedContextSizeForRange`, the offset of range is only used one time, there is no need to cache the frame location stack.
Measured on one internal service binary, this can save 2GB memory usage and reduce a small run time (avoid one hash search).

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D128859
llvm/tools/llvm-profgen/ProfileGenerator.cpp
llvm/tools/llvm-profgen/ProfiledBinary.cpp
llvm/tools/llvm-profgen/ProfiledBinary.h