Skip to content

PassManager should minimize number of LoopPassManagers #9556

@llvmbot

Description

@llvmbot
Bugzilla Link 9184
Version trunk
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

Currently, this analysis usage (taken from LoopStrengthReduce)

AU.addRequired();
AU.addRequiredID(LoopSimplifyID);
AU.addRequired();
AU.addRequired();
AU.addRequired();

causes this pass order:

 Natural Loop Information
  Loop Pass Manager
    Canonicalize natural loops
  Scalar Evolution Analysis
  Loop Pass Manager
    Induction Variable Users
    Canonicalize natural loops
    Induction Variable Users
    Loop Strength Reduction

The PassManager should move ScalarEvolution before all of the loop passes, since they all preserve ScalarEvolution. It is easy enough to fix this by changing the pass ordering, but in the future this could be done automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions