[PATCH] D125485: [ArgPromotion] Unify byval promotion with non-byval
    Pavel Samolysov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed May 18 08:56:14 PDT 2022
    
    
  
psamolysov added a comment.
Unfortunately, a `CallGraphSCCPass` pass (the legacy `ArgPromotion` pass is a child of this class) cannot use a function analysis pass, `DominatorTreeWrapperPass` for example. It is interesting, the compiled with the new version of the `ArgumentPromotion` pass `opt` tool crashes by this reason only during a run of the Polly tests (you can see the crash in the pre-merge checks on Windows).
A workaround can be the following: convert the legacy `ArgPromotion` pass into a module pass and use the `<llvm/ADT/SCCIterator.h>`, the solution is described on the StackOverflow: https://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass This approach has a few disadvantages: the code of the `CallGraphSCCPass::getAnalysisUsage(AnalysisUsage &)` method should be copied into the `ArgPromotion::getAnalysisUsage` (2 line are there though) and `skipSCC(SCC)` won't be available anymore as well as `CallGraphSCCPass::doInitialization()` but this is an empty method.
I'm going to implement this workaround to check if this works at all. This has no impact on the `ArgumentPromotionPass` pass that is used by the new pass manager.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125485/new/
https://reviews.llvm.org/D125485
    
    
More information about the llvm-commits
mailing list