aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/ScheduleDAGInstrs.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-01-29 22:00:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-29 22:00:02 +0000
commite5f956c679818bec74f1ee8c52002b48e1e4562a (patch)
tree576bd84ca2eba60f7f91c13540048e679b7470bb /lib/CodeGen/ScheduleDAGInstrs.cpp
parent848d771ddb35416be6acee900d0936fc037b2d6e (diff)
parent4e18f8fb700656330c307f80a826823271182b01 (diff)
downloadexternal_llvm-e5f956c679818bec74f1ee8c52002b48e1e4562a.zip
external_llvm-e5f956c679818bec74f1ee8c52002b48e1e4562a.tar.gz
external_llvm-e5f956c679818bec74f1ee8c52002b48e1e4562a.tar.bz2
am 4e18f8fb: am e5656de2: Merge "MISched: Fix moving stores across barriers"
* commit '4e18f8fb700656330c307f80a826823271182b01': MISched: Fix moving stores across barriers
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.cpp')
-rw-r--r--lib/CodeGen/ScheduleDAGInstrs.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp
index d8d8422..dece643 100644
--- a/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -920,6 +920,13 @@ void ScheduleDAGInstrs::buildSchedGraph(AliasAnalysis *AA,
AliasMemDefs.clear();
AliasMemUses.clear();
} else if (MI->mayStore()) {
+ // Add dependence on barrier chain, if needed.
+ // There is no point to check aliasing on barrier event. Even if
+ // SU and barrier _could_ be reordered, they should not. In addition,
+ // we have lost all RejectMemNodes below barrier.
+ if (BarrierChain)
+ BarrierChain->addPred(SDep(SU, SDep::Barrier));
+
UnderlyingObjectsVector Objs;
getUnderlyingObjectsForInstr(MI, MFI, Objs);
@@ -989,12 +996,6 @@ void ScheduleDAGInstrs::buildSchedGraph(AliasAnalysis *AA,
adjustChainDeps(AA, MFI, SU, &ExitSU, RejectMemNodes,
TrueMemOrderLatency);
}
- // Add dependence on barrier chain, if needed.
- // There is no point to check aliasing on barrier event. Even if
- // SU and barrier _could_ be reordered, they should not. In addition,
- // we have lost all RejectMemNodes below barrier.
- if (BarrierChain)
- BarrierChain->addPred(SDep(SU, SDep::Barrier));
} else if (MI->mayLoad()) {
bool MayAlias = true;
if (MI->isInvariantLoad(AA)) {