[PATCH] D84228: [CodeGen][TargetPassConfig] Add unreachable-mbb-elimination pass explicitly
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 01:58:48 PDT 2020
evgeny777 added a comment.
> 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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84228/new/
https://reviews.llvm.org/D84228
More information about the llvm-commits
mailing list