]> granicus.if.org Git - llvm/commitdiff
[TargetSchedule] Use 'isOutOfOrder' as possible to avoid magic number. NFC.
authorJunmo Park <junmoz.park@samsung.com>
Tue, 21 Jun 2016 08:09:58 +0000 (08:09 +0000)
committerJunmo Park <junmoz.park@samsung.com>
Tue, 21 Jun 2016 08:09:58 +0000 (08:09 +0000)
Summary:
Using isOutOfOrder makes the code more clear.

Reviewers: rengolin, atrick, hfinkel.

Differential Revision: http://reviews.llvm.org/D21548

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273255 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetSchedule.cpp

index f5181a362d72c079e6c0184bf7465eecb7aca3fd..19300070dfbadf8e32f0069fbbb6261a69fb01d7 100644 (file)
@@ -267,11 +267,10 @@ TargetSchedModel::computeInstrLatency(const MachineInstr *MI,
 unsigned TargetSchedModel::
 computeOutputLatency(const MachineInstr *DefMI, unsigned DefOperIdx,
                      const MachineInstr *DepMI) const {
-  if (SchedModel.MicroOpBufferSize <= 1)
+  if (!SchedModel.isOutOfOrder())
     return 1;
 
-  // MicroOpBufferSize > 1 indicates an out-of-order processor that can dispatch
-  // WAW dependencies in the same cycle.
+  // Out-of-order processor can dispatch WAW dependencies in the same cycle.
 
   // Treat predication as a data dependency for out-of-order cpus. In-order
   // cpus do not need to treat predicated writes specially.