@@ -750,30 +750,44 @@ bool AAResultsWrapperPass::runOnFunction(Function &F) {
750750
751751 // Add any target-specific alias analyses that should be run early.
752752 auto *ExtWrapperPass = getAnalysisIfAvailable<ExternalAAWrapperPass>();
753- if (ExtWrapperPass && ExtWrapperPass->runEarly () && ExtWrapperPass->CB )
753+ if (ExtWrapperPass && ExtWrapperPass->runEarly () && ExtWrapperPass->CB ) {
754+ LLVM_DEBUG (dbgs () << " AAResults register Early ExternalAA: " << ExtWrapperPass->getPassName () << " \n " );
754755 ExtWrapperPass->CB (*this , F, *AAR);
756+ }
755757
756758 // BasicAA is always available for function analyses. Also, we add it first
757759 // so that it can trump TBAA results when it proves MustAlias.
758760 // FIXME: TBAA should have an explicit mode to support this and then we
759761 // should reconsider the ordering here.
760- if (!DisableBasicAA)
762+ if (!DisableBasicAA) {
763+ LLVM_DEBUG (dbgs () << " AAResults register BasicAA\n " );
761764 AAR->addAAResult (getAnalysis<BasicAAWrapperPass>().getResult ());
765+ }
762766
763767 // Populate the results with the currently available AAs.
764- if (auto *WrapperPass = getAnalysisIfAvailable<ScopedNoAliasAAWrapperPass>())
768+ if (auto *WrapperPass = getAnalysisIfAvailable<ScopedNoAliasAAWrapperPass>()) {
769+ LLVM_DEBUG (dbgs () << " AAResults register ScopedNoAliasAA\n " );
765770 AAR->addAAResult (WrapperPass->getResult ());
766- if (auto *WrapperPass = getAnalysisIfAvailable<TypeBasedAAWrapperPass>())
771+ }
772+ if (auto *WrapperPass = getAnalysisIfAvailable<TypeBasedAAWrapperPass>()) {
773+ LLVM_DEBUG (dbgs () << " AAResults register TypeBasedAA\n " );
767774 AAR->addAAResult (WrapperPass->getResult ());
768- if (auto *WrapperPass = getAnalysisIfAvailable<GlobalsAAWrapperPass>())
775+ }
776+ if (auto *WrapperPass = getAnalysisIfAvailable<GlobalsAAWrapperPass>()) {
777+ LLVM_DEBUG (dbgs () << " AAResults register GlobalsAA\n " );
769778 AAR->addAAResult (WrapperPass->getResult ());
770- if (auto *WrapperPass = getAnalysisIfAvailable<SCEVAAWrapperPass>())
779+ }
780+ if (auto *WrapperPass = getAnalysisIfAvailable<SCEVAAWrapperPass>()) {
781+ LLVM_DEBUG (dbgs () << " AAResults register SCEVAA\n " );
771782 AAR->addAAResult (WrapperPass->getResult ());
783+ }
772784
773785 // If available, run an external AA providing callback over the results as
774786 // well.
775- if (ExtWrapperPass && !ExtWrapperPass->runEarly () && ExtWrapperPass->CB )
787+ if (ExtWrapperPass && !ExtWrapperPass->runEarly () && ExtWrapperPass->CB ) {
788+ LLVM_DEBUG (dbgs () << " AAResults register Late ExternalAA: " << ExtWrapperPass->getPassName () << " \n " );
776789 ExtWrapperPass->CB (*this , F, *AAR);
790+ }
777791
778792 // Analyses don't mutate the IR, so return false.
779793 return false ;
0 commit comments