From 014fc128e6c684f90db90a1e3af34f70ee0c951b Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 10 May 2016 20:11:58 +0000 Subject: [PATCH] ScheduleDAGInstrs: Comment on why subreg defs are not seen as uses; NFC Usually subregister definitions are consider uses of the remaining lanes that did not get defined. Add a comment why the code in ScheduleDAGInstrs does not add use dependencies regardless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269107 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ScheduleDAGInstrs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index e9ab6a24f8a..d4c4c2c1ddf 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -971,6 +971,10 @@ void ScheduleDAGInstrs::buildSchedGraph(AliasAnalysis *AA, // Now process all uses. for (unsigned j = 0, n = MI->getNumOperands(); j != n; ++j) { const MachineOperand &MO = MI->getOperand(j); + // Only look at use operands. + // We do not need to check for MO.readsReg() here because subsequent + // subregister defs will get output dependence edges and need no + // additional use dependencies. if (!MO.isReg() || !MO.isUse()) continue; unsigned Reg = MO.getReg(); -- 2.50.1