[llvm] r269107 - ScheduleDAGInstrs: Comment on why subreg defs are not seen as uses; NFC
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 13:11:59 PDT 2016
Author: matze
Date: Tue May 10 15:11:58 2016
New Revision: 269107
URL: http://llvm.org/viewvc/llvm-project?rev=269107&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=269107&r1=269106&r2=269107&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Tue May 10 15:11:58 2016
@@ -971,6 +971,10 @@ void ScheduleDAGInstrs::buildSchedGraph(
// 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();
More information about the llvm-commits
mailing list