[PATCH] D94416: [PM] Avoid duplicates in the Used/Preserved/Required sets

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 09:36:02 PST 2021


bjope added a comment.

In D94416#2493099 <https://reviews.llvm.org/D94416#2493099>, @foad wrote:

> Does this make any difference in practice? E.g. does the output of `opt -O1 -debug-pass=Executions` change, or can you measure any timing difference?

Currently `-debug-pass` isn't showing when verifyAnalysis is called. But if we add a debug printout in PMDataManager::verifyPreservedAnalysis that prints the analysis passes that are verified (either for `-debug-pass=Executions` or `-debug-pass=Details`) then it would be possible to create a test case that show the difference in number of verifyAnalysis calls that we get.

There might be some overhead when setting up the pipeline (due to the llvm::is_contained calls), while we also same some work as we no longer need to deal with duplicates when iterating over the different sets. To see a speedup due to less calls to verifyAnalysis one would need to run lots of test cases with the verifiers enabled (and maybe also with EXPENSIVE_CHECKS=ON). 
I haven't done any timing measurements. I've just assumed that it won't be worse if doing less duplicated work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94416



More information about the llvm-commits mailing list