This allows starting from/stopping at this pass when doing partial pipeline execution
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is an unfortunate limit of legacy pass manager lacking runtime pass instrumentation support. NPM has better support of this.
Does this mean that we run UnreachableMachineBlockElimID twice? This new addPass and the old addRequiredID? Is it safe to remove the addRequiredID case?
Does this mean that we run UnreachableMachineBlockElimID twice?
If we execute pipeline normally (e.g llc -O3) then no. We'll pick previously added UnreachableMachineBlockElimID pass when scheduling LiveVariables pass (see PMTopLevelManager::schedulePass and findAnalysisPass)
The only way we can run UnreachableMachineBlockElimID twice is:
llc -O3 -stop-after=unreachable-mbb-elimination foo.ll -o foo.mir llc -O3 -start-after=unreachable-mbb-elimination foo.mir -o foo.s
In the case above the second command will execute UnreachableMachineBlockElimID again (which is no-op due to absence of dead blocks)
Is it safe to remove the addRequiredID case?
I don't think so. This can cause trouble with pipelines constructed using API calls.
Thanks for the explanation! Could please add a comment like "This allows starting from/stopping at this pass when doing partial pipeline execution"?