summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ScheduleDAGInstrs.cpp
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-11-05 00:16:44 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-11-05 00:16:44 +0000
commit5be870add97c52862285eddaf950c806a3fa076b (patch)
tree565716d017b7e9e13283ba333b9ce5f08a75d125 /lib/CodeGen/ScheduleDAGInstrs.cpp
parent24f934d0551e33508c4ffd24318ea0e970db9810 (diff)
downloadllvm-5be870add97c52862285eddaf950c806a3fa076b.tar.gz
llvm-5be870add97c52862285eddaf950c806a3fa076b.tar.bz2
llvm-5be870add97c52862285eddaf950c806a3fa076b.tar.xz
Correctly add chain dependencies around calls and unknown-side-effect instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.cpp')
-rw-r--r--lib/CodeGen/ScheduleDAGInstrs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp
index 6070ff6ed1..f8b219d641 100644
--- a/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -367,6 +367,7 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
for (unsigned i = 0, e = I->second.size(); i != e; ++i)
I->second[i]->addPred(SDep(SU, SDep::Order, TrueMemOrderLatency));
I->second.clear();
+ I->second.push_back(SU);
}
// See if it is known to just have a single memory reference.
MachineInstr *ChainMI = Chain->getInstr();
@@ -413,7 +414,7 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
if (Chain)
Chain->addPred(SDep(SU, SDep::Order, /*Latency=*/0));
}
- } else if (MayAlias) {
+ } else {
// Treat all other stores conservatively.
goto new_chain;
}
@@ -439,7 +440,7 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
// Treat volatile loads conservatively. Note that this includes
// cases where memoperand information is unavailable.
goto new_chain;
- } else if (MayAlias) {
+ } else {
// A "MayAlias" load. Depend on the general chain, as well as on
// all stores. In the absense of MachineMemOperand information,
// we can't even assume that the load doesn't alias well-behaved