The verifier is semi-reliant on LiveIntervals in a weird way. The
verifier has its own liveness analysis, which misses some things
caught with LiveIntervals. As a consequence, llvm-reduce's use of the
verifier fails to filter out some invalid MIR. Allow constructing
LiveIntervals independently of a PassManager, so that llvm-reduce can
use this directly in its passless verify calls. Additionally, some
reductions should directly inspect the LiveIntervals.
Details
Diff Detail
Event Timeline
I think it's fair to have a version of the algorithm that is not an analysis pass. It feels a bit odd, that the classes are subclasses of MachineFunctionPass but can now (also) be created independently without actually being added to a pass manager, but I guess it avoids a log of refactoring, so okay...
llvm/include/llvm/CodeGen/LiveIntervals.h | ||
---|---|---|
103–104 | This constructor doesn't have a definition. Is it from an early version and you meant to remove it? | |
105–106 | This probably deserves a comment, mentioning that it should be used when constructor LiveIntervals independently without being an actual AnalysisPass. I'd prefer compute as a name, but no strong opinion. | |
llvm/include/llvm/CodeGen/SlotIndexes.h | ||
360 | Maybe call it compute to fit the pattern of the LiveIntervals code. Again no strong opinion. | |
llvm/lib/CodeGen/LiveIntervals.cpp | ||
120–125 | Make Indexes_ and DT_ parameters references to indicate that they must not be nullptr. |
This constructor doesn't have a definition. Is it from an early version and you meant to remove it?