[PATCH] D100917: [NewPM] Only invalidate modified functions' analyses in CGSCC passes

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 16:16:27 PDT 2021


aeubanks reopened this revision.
aeubanks added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: ormris.

Using valgrind's massif, I profiled using clang build build PassBuilder.cpp (it's one of the longest LLVM files to compile), and at peak memory usage:

without patch: 42.5% Clang AST, 11.6% misc, 5.6% BlockFrequencyInfo, 3.3% DomTree, 1.4% LazyCallGraph, 1.2% MemorySSA
with patch: 37.6% Clang AST, 12.7% misc, 4.9% BlockFrequencyInfo, 3.4% MemorySSA, 3.2% DomTree, 1.7% BlockProbabilityInfo (again), 1.2% LazyCallGraph
misc means anything below 0.3%
(I'm ignoring some LLVM non-analysis and Clang stuff)
assuming that the Clang AST is mostly constant between the two, it does look like my patch (https://reviews.llvm.org/D100917) does slightly increase memory usage, at least just for some random file (PassBuilder.cpp), and some files are likely to be much worse due to more SCCs. and there's no obvious large analysis to clear out

I'll look to see if we really need the Clang AST while running passes, although I'm not hopeful there


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100917/new/

https://reviews.llvm.org/D100917



More information about the cfe-commits mailing list