aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2014-12-10 03:34:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-10 03:34:12 +0000
commita3a36cf628f1b0f3980bdb28c103c0e776288da9 (patch)
tree54fc3c70c3455fcc7d6804834aaaecf0d666168a
parenta21bbdfad461e957fa42ac9d6860ddc9de2da3e9 (diff)
parent6eeae0cf0069a272980de53836081a244ca5dffb (diff)
downloadexternal_llvm-a3a36cf628f1b0f3980bdb28c103c0e776288da9.zip
external_llvm-a3a36cf628f1b0f3980bdb28c103c0e776288da9.tar.gz
external_llvm-a3a36cf628f1b0f3980bdb28c103c0e776288da9.tar.bz2
am 6eeae0cf: Revert "Apply rL216114 from upstream LLVM."
* commit '6eeae0cf0069a272980de53836081a244ca5dffb': Revert "Apply rL216114 from upstream LLVM."
-rw-r--r--lib/CodeGen/CriticalAntiDepBreaker.cpp19
-rw-r--r--test/CodeGen/X86/critical-anti-dep-breaker.ll28
2 files changed, 2 insertions, 45 deletions
diff --git a/lib/CodeGen/CriticalAntiDepBreaker.cpp b/lib/CodeGen/CriticalAntiDepBreaker.cpp
index 3d62d48..d083c8e 100644
--- a/lib/CodeGen/CriticalAntiDepBreaker.cpp
+++ b/lib/CodeGen/CriticalAntiDepBreaker.cpp
@@ -90,14 +90,7 @@ void CriticalAntiDepBreaker::FinishBlock() {
void CriticalAntiDepBreaker::Observe(MachineInstr *MI, unsigned Count,
unsigned InsertPosIndex) {
- // Kill instructions can define registers but are really nops, and there might
- // be a real definition earlier that needs to be paired with uses dominated by
- // this kill.
-
- // FIXME: It may be possible to remove the isKill() restriction once PR18663
- // has been properly fixed. There can be value in processing kills as seen in
- // the AggressiveAntiDepBreaker class.
- if (MI->isDebugValue() || MI->isKill())
+ if (MI->isDebugValue())
return;
assert(Count < InsertPosIndex && "Instruction index out of expected range!");
@@ -240,7 +233,6 @@ void CriticalAntiDepBreaker::ScanInstruction(MachineInstr *MI,
// Update liveness.
// Proceeding upwards, registers that are defed but not used in this
// instruction are now dead.
- assert(!MI->isKill() && "Attempting to scan a kill instruction");
if (!TII->isPredicated(MI)) {
// Predicated defs are modeled as read + write, i.e. similar to two
@@ -512,14 +504,7 @@ BreakAntiDependencies(const std::vector<SUnit>& SUnits,
unsigned Count = InsertPosIndex - 1;
for (MachineBasicBlock::iterator I = End, E = Begin; I != E; --Count) {
MachineInstr *MI = --I;
- // Kill instructions can define registers but are really nops, and there
- // might be a real definition earlier that needs to be paired with uses
- // dominated by this kill.
-
- // FIXME: It may be possible to remove the isKill() restriction once PR18663
- // has been properly fixed. There can be value in processing kills as seen
- // in the AggressiveAntiDepBreaker class.
- if (MI->isDebugValue() || MI->isKill())
+ if (MI->isDebugValue())
continue;
// Check if this instruction has a dependence on the critical path that
diff --git a/test/CodeGen/X86/critical-anti-dep-breaker.ll b/test/CodeGen/X86/critical-anti-dep-breaker.ll
deleted file mode 100644
index 32d3f49..0000000
--- a/test/CodeGen/X86/critical-anti-dep-breaker.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic -post-RA-scheduler=1 -break-anti-dependencies=critical | FileCheck %s
-
-; PR20308 ( http://llvm.org/bugs/show_bug.cgi?id=20308 )
-; The critical-anti-dependency-breaker must not use register def information from a kill inst.
-; This test case expects such an instruction to appear as a comment with def info for RDI.
-; There is an anti-dependency (WAR) hazard using RAX using default reg allocation and scheduling.
-; The post-RA-scheduler and critical-anti-dependency breaker can eliminate that hazard using R10.
-; That is the first free register that isn't used as a param in the call to "@Image".
-
-@PartClass = external global i32
-@NullToken = external global i64
-
-; CHECK-LABEL: Part_Create:
-; CHECK-DAG: # kill: RDI<def>
-; CHECK-DAG: movq PartClass@GOTPCREL(%rip), %r10
-define i32 @Part_Create(i64* %Anchor, i32 %TypeNum, i32 %F, i32 %Z, i32* %Status, i64* %PartTkn) {
- %PartObj = alloca i64*, align 8
- %Vchunk = alloca i64, align 8
- %1 = load i64* @NullToken, align 4
- store i64 %1, i64* %Vchunk, align 8
- %2 = load i32* @PartClass, align 4
- call i32 @Image(i64* %Anchor, i32 %2, i32 0, i32 0, i32* %Status, i64* %PartTkn, i64** %PartObj)
- call i32 @Create(i64* %Anchor)
- ret i32 %2
-}
-
-declare i32 @Image(i64*, i32, i32, i32, i32*, i64*, i64**)
-declare i32 @Create(i64*)