mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[CodeGen][TargetPassConfig] Add unreachable-mbb-elimination pass explicitly
Differential revision: https://reviews.llvm.org/D84228
This commit is contained in:
parent
8d05b090aa
commit
355534b549
@ -1183,6 +1183,11 @@ void TargetPassConfig::addOptimizedRegAlloc() {
|
||||
// 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.
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user