projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e49406f
)
Fix a major bug in operand latency computation. The use index must be adjusted
author
Evan Cheng
<evan.cheng@apple.com>
Thu, 28 Oct 2010 01:46:29 +0000
(
01:46
+0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Thu, 28 Oct 2010 01:46:29 +0000
(
01:46
+0000)
by the number of defs first for it to match the instruction itinerary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117518
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 0ffb4da0f3613d3dc044094f42f7629526cd533f..d34a52d80144997a85a1d7939dbef19eb883fdc6 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@
-454,6
+454,9
@@
void ScheduleDAGSDNodes::ComputeOperandLatency(SDNode *Def, SDNode *Use,
return;
unsigned DefIdx = Use->getOperand(OpIdx).getResNo();
+ if (Use->isMachineOpcode())
+ // Adjust the use operand index by num of defs.
+ OpIdx += TII->get(Use->getMachineOpcode()).getNumDefs();
int Latency = TII->getOperandLatency(InstrItins, Def, DefIdx, Use, OpIdx);
if (Latency >= 0)
dep.setLatency(Latency);