diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-01-28 18:36:58 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-01-28 18:36:58 +0000 |
commit | 5ff776bfde2dd5d993e51f8f78904ce331b5528c (patch) | |
tree | 86b47f68ab5dc43e39d22b3545aff4c63fa696c4 /lib/CodeGen/CriticalAntiDepBreaker.h | |
parent | 498703bcfb274f3911a1fdbfb818b526338249ad (diff) | |
download | external_llvm-5ff776bfde2dd5d993e51f8f78904ce331b5528c.zip external_llvm-5ff776bfde2dd5d993e51f8f78904ce331b5528c.tar.gz external_llvm-5ff776bfde2dd5d993e51f8f78904ce331b5528c.tar.bz2 |
This patch addresses bug 15031.
The common code in the post-RA scheduler to break anti-dependencies on the
critical path contained a flaw. In the reported case, an anti-dependency
between the overlapping registers %X4 and %R4 exists:
%X29<def> = OR8 %X4, %X4
%R4<def>, %X3<def,dead,tied3> = LBZU 1, %X3<kill,tied1>
The unpatched code breaks the dependency by replacing %R4 and its uses
with %R3, the first register on the available list. However, %R3 and
%X3 overlap, so this creates two overlapping definitions on the same
instruction.
The fix is straightforward, preventing selection of a register that
overlaps any other defined register on the same instruction.
The test case is reduced from the bug report, and verifies that we no
longer produce "lbzu 3, 1(3)" when breaking this anti-dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CriticalAntiDepBreaker.h')
-rw-r--r-- | lib/CodeGen/CriticalAntiDepBreaker.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CriticalAntiDepBreaker.h b/lib/CodeGen/CriticalAntiDepBreaker.h index 8fb2b0e..df13dd3 100644 --- a/lib/CodeGen/CriticalAntiDepBreaker.h +++ b/lib/CodeGen/CriticalAntiDepBreaker.h @@ -102,7 +102,8 @@ class TargetRegisterInfo; RegRefIter RegRefEnd, unsigned AntiDepReg, unsigned LastNewReg, - const TargetRegisterClass *RC); + const TargetRegisterClass *RC, + SmallVector<unsigned, 2> &Forbid); }; } |