diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-16 21:57:43 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-16 21:57:43 +0000 |
commit | 49bb50e0b65d4646a1d44eec3196c003c13caa96 (patch) | |
tree | 32ef3c2e527d7f56661419903cece6c4022e961b /lib/CodeGen/PostRASchedulerList.cpp | |
parent | b6a6164832572b2daeba604d6378ad49128d212f (diff) |
If an anti-dependence uses a non-allocatable register, set AntiDepReg
to 0, to ensure that the subsequent code doesn't try to break the
dependence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PostRASchedulerList.cpp')
-rw-r--r-- | lib/CodeGen/PostRASchedulerList.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp index 12d9efa87b..eef20b9386 100644 --- a/lib/CodeGen/PostRASchedulerList.cpp +++ b/lib/CodeGen/PostRASchedulerList.cpp @@ -442,7 +442,9 @@ bool SchedulePostRATDList::BreakAntiDependencies() { AntiDepReg = Edge->getReg(); assert(AntiDepReg != 0 && "Anti-dependence on reg0?"); // Don't break anti-dependencies on non-allocatable registers. - if (AllocatableSet.test(AntiDepReg)) { + if (!AllocatableSet.test(AntiDepReg)) + AntiDepReg = 0; + else { // If the SUnit has other dependencies on the SUnit that it // anti-depends on, don't bother breaking the anti-dependency // since those edges would prevent such units from being |