Set the isAntiDep flag in the MachineInstr scheduler.
authorDan Gohman <gohman@apple.com>
Fri, 21 Nov 2008 02:38:21 +0000 (02:38 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 21 Nov 2008 02:38:21 +0000 (02:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59787 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ScheduleDAGInstrs.cpp

index ec8fc66a3ee4a776ae1a2705cbaccdf4ee47decf..c83af095d08691b6411b77a31e47ed2f098e2e7a 100644 (file)
@@ -53,7 +53,7 @@ void ScheduleDAGInstrs::BuildSchedUnits() {
       // Optionally add output and anti dependences.
       if (Def && Def != SU)
         Def->addPred(SU, /*isCtrl=*/true, /*isSpecial=*/false,
-                     /*PhyReg=*/Reg, Cost);
+                     /*PhyReg=*/Reg, Cost, /*isAntiDep=*/MO.isUse());
       for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
         SUnit *&Def = Defs[*Alias];
         if (Def && Def != SU)