[PATCH] D120782: [polly] Introduce -polly-print-* passes to replace -analyze.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 00:08:34 PST 2022


aeubanks added a comment.

In D120782#3355541 <https://reviews.llvm.org/D120782#3355541>, @Meinersbur wrote:

> In D120782#3355237 <https://reviews.llvm.org/D120782#3355237>, @aeubanks wrote:
>
>> for the remaining `-analyze -loops` tests, do the polly passes in those tests have new PM equivalents?
>> `-passes='print<loops>'` should be a suitable replacement for `-loops -analyze`
>
>
>
> name=CodeGen/single_loop_param_less_equal.ll
>   ; RUN: opt %loadPolly -polly-codegen -loops -analyze < %s | FileCheck %s -check-prefix=LOOPS
>
>
>
> name=CodeGen\loop_with_condition_nested.ll
>   ; RUN: opt %loadPolly -basic-aa -polly-codegen -loops -analyze < %s | FileCheck %s -check-prefix=LOOPS
>
> `-polly-codegen` does not emit anything with `-analyze`. It is testing which loops after `-polly-codegen`. Therefore, this could be equivalent using the NPM:
>
>   ; RUN: opt %loadPolly -passes="function(scop(polly-codegen),print<loops>)" -disable-output < %s 2>&1 | FileCheck %s -check-prefix=LOOPS
>
> However, it is failing due to how differently the NPM works.

based on local testing even something like `opt %loadPolly -basic-aa -polly-codegen < %s | opt -enable-new-pm=0 -loops -analyze` fails the same way. even `opt %loadPolly -basic-aa -polly-codegen -barrier -loops -analyze` does the same thing, so it seems like some sort of interaction between the scheduling of `Region` passes and the loop printing
`-debug-pass=Structure` doesn't show anything suspicious though

  Pass Arguments:  -targetlibinfo -tti -assumption-cache-tracker -profile-summary-info -domtree -basic-aa -loops -postdomtree -domfrontier -regions -scalar-evolution -lazy-branch-prob -lazy-block-freq -opt-remark-emitter -aa -polly-detect -polly-scops -polly-dependences -polly-ast -polly-codegen -verify
  Target Library Information
  Target Transform Information
  Assumption Cache Tracker
  Profile summary info
    ModulePass Manager
      FunctionPass Manager
        Dominator Tree Construction
        Basic Alias Analysis (stateless AA impl)
        FunctionPass Printer: Basic Alias Analysis (stateless AA impl)
        Natural Loop Information
        Post-Dominator Tree Construction
        Dominance Frontier Construction
        Detect single entry single exit regions
        Scalar Evolution Analysis
        Lazy Branch Probability Analysis
        Lazy Block Frequency Analysis
        Optimization Remark Emitter
        Function Alias Analysis Results
        Polly - Detect static control parts (SCoPs)
        Region Pass Manager
          Polly - Create polyhedral description of Scops
          Polly - Calculate dependences
          Polly - Generate an AST from the SCoP (isl)
          Polly - Create LLVM-IR from SCoPs
          RegionPass Printer: Polly - Create LLVM-IR from SCoPs
        FunctionPass Printer: Natural Loop Information
        Module Verifier

and verifying the loop info doesn't show any issues


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120782



More information about the llvm-commits mailing list