[PATCH] D84228: [CodeGen][TargetPassConfig] Add unreachable-mbb-elimination pass explicitly
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 08:05:46 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdc619f3d7a97: [CodeGen][TargetPassConfig] Add unreachable-mbb-elimination pass explicitly (authored by evgeny777).
Changed prior to commit:
https://reviews.llvm.org/D84228?vs=279470&id=280130#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84228/new/
https://reviews.llvm.org/D84228
Files:
llvm/lib/CodeGen/TargetPassConfig.cpp
llvm/test/CodeGen/AArch64/partial-pipeline-execution.ll
Index: llvm/test/CodeGen/AArch64/partial-pipeline-execution.ll
===================================================================
--- llvm/test/CodeGen/AArch64/partial-pipeline-execution.ll
+++ llvm/test/CodeGen/AArch64/partial-pipeline-execution.ll
@@ -7,6 +7,11 @@
; optimize the loop differently
; RUN: cmp %t.s %t2.s
+; Check that we can do the same with unreachable-mbb-elimination pass
+; RUN: llc -O3 -stop-after=unreachable-mbb-elimination %s -o %t-mbb-elim.mir
+; RUN: llc -O3 -start-after=unreachable-mbb-elimination %t-mbb-elim.mir -o %t3.s
+; RUN: cmp %t.s %t3.s
+
; ModuleID = 'loop.c'
source_filename = "loop.c"
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
Index: llvm/lib/CodeGen/TargetPassConfig.cpp
===================================================================
--- llvm/lib/CodeGen/TargetPassConfig.cpp
+++ llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -1183,6 +1183,11 @@
// LiveVariables can be removed completely, and LiveIntervals can be directly
// computed. (We still either need to regenerate kill flags after regalloc, or
// preferably fix the scavenger to not depend on them).
+ // FIXME: UnreachableMachineBlockElim is a dependant pass of LiveVariables.
+ // When LiveVariables is removed this has to be removed/moved either.
+ // Explicit addition of UnreachableMachineBlockElim allows stopping before or
+ // after it with -stop-before/-stop-after.
+ addPass(&UnreachableMachineBlockElimID, false);
addPass(&LiveVariablesID, false);
// Edge splitting is smarter with machine loop info.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84228.280130.patch
Type: text/x-patch
Size: 1575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/331497cc/attachment.bin>
More information about the llvm-commits
mailing list