[PATCH] D21548: [TargetSchedule] Use 'isOutOfOrder' as possible to avoid magic number. NFC.
Junmo Park via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 01:01:00 PDT 2016
flyingforyou created this revision.
flyingforyou added reviewers: rengolin, atrick.
flyingforyou added a subscriber: llvm-commits.
Using `isOutOfOrder` makes the code more clear.
http://reviews.llvm.org/D21548
Files:
lib/CodeGen/TargetSchedule.cpp
Index: lib/CodeGen/TargetSchedule.cpp
===================================================================
--- lib/CodeGen/TargetSchedule.cpp
+++ lib/CodeGen/TargetSchedule.cpp
@@ -267,11 +267,10 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21548.61343.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160621/88258ebc/attachment.bin>
More information about the llvm-commits
mailing list