diff options
author | Matthias Braun <matze@braunis.de> | 2016-11-10 23:46:44 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-11-10 23:46:44 +0000 |
commit | f29b12dca83ab27bcfe697c4f990ca2391c41681 (patch) | |
tree | 44e2de2cc8f7e23c4ab021b5efa505b7650dd99e /llvm/lib/CodeGen | |
parent | ff82547f98e153646205168f4e072abfd72f0f21 (diff) | |
download | bcm5719-llvm-f29b12dca83ab27bcfe697c4f990ca2391c41681.tar.gz bcm5719-llvm-f29b12dca83ab27bcfe697c4f990ca2391c41681.zip |
ScheduleDAGInstrs: Ignore dependencies of constant physregs
There is no need to track dependencies for constant physregs, as they
don't change their value no matter in what order you read/write to them.
Differential Revision: https://reviews.llvm.org/D26221
llvm-svn: 286526
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAGInstrs.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp index d184c0e240f..a9b5e88e5b4 100644 --- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -323,6 +323,9 @@ void ScheduleDAGInstrs::addPhysRegDeps(SUnit *SU, unsigned OperIdx) { MachineInstr *MI = SU->getInstr(); MachineOperand &MO = MI->getOperand(OperIdx); unsigned Reg = MO.getReg(); + // We do not need to track any dependencies for constant registers. + if (MRI.isConstantPhysReg(Reg)) + return; // Optionally add output and anti dependencies. For anti // dependencies we use a latency of 0 because for a multi-issue |