[NewPM] Add PipelineTuningOption to eagerly invalidate analyses
authorArthur Eubanks <aeubanks@google.com>
Mon, 11 Oct 2021 19:57:30 +0000 (12:57 -0700)
committerArthur Eubanks <aeubanks@google.com>
Mon, 18 Oct 2021 20:20:35 +0000 (13:20 -0700)
commitb8ce97372d85ef0e6103ec8055fc5154f3bb5862
treec98027a87f0d760a835e4782af55e87689dd9b62
parentb9cfa016daae725e4ed8173b431afb5e01cb80a6
[NewPM] Add PipelineTuningOption to eagerly invalidate analyses

This trades off more compile time for less peak memory usage. Right now
it invalidates all function analyses after a module->function or
cgscc->function adaptor.

https://llvm-compile-time-tracker.com/compare.php?from=1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3&to=cb28ddb063c87f0d5df89812ab2de9a69dd276db&stat=instructions
https://llvm-compile-time-tracker.com/compare.php?from=1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3&to=cb28ddb063c87f0d5df89812ab2de9a69dd276db&stat=max-rss

For now this is just experimental.

See comments on why this may affect optimizations.

Reviewed By: asbirlea, nikic

Differential Revision: https://reviews.llvm.org/D111575
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/IR/PassManager.cpp
llvm/test/Other/new-pm-eager-invalidate.ll [new file with mode: 0644]